Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The project page should explain more clearly what this module (and its submodules) does exactly. Right now, this is not very clear.
Comment | File | Size | Author |
---|---|---|---|
#4 | advagg-minor-1066628-4.patch | 12.32 KB | mikeytown2 |
#3 | advagg-readme-1066628-3.patch | 7.25 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedGoing to use this issue to work out a better description. It's kinda hard to describe what this does at a high level without getting into the details of how it works.
High Level:
Fixes css/js aggregation from my point of view. Takes care of every issue we've encountered and does things that I wish would happen (cdn/compression).
Low level description:
This module is a replacement for cores css/js aggregation. When an aggregate is created it records what files go into the aggregate and in what order they belong. What this allows for is the ability to re-create the aggregate via filename. Example filename:
css_3d065e72e1bde98881aa8ff07154e7da_0.css
css_[MD5]_[Counter].css
The MD5 hash is used to lookup the bundle and what files are in it and in what order the bundle needs to be re-created. The counter is a way to handle changes that happen within the aggregate. When hook_flush_caches is ran, this will scan all files that have been used in an aggregate and if one of them has changed then it it will increment the counter for that individual file and it will increment the counter for all bundles that contain that file. It will then generate new aggregates for the bundles that need to be updated. So in the example above if a file is changed then the new filename is now
css_3d065e72e1bde98881aa8ff07154e7da_1.css
If we add/subtract a file from the bundle then it gets a new name
css_329b40f01efc15a5d83dde5117251842_0.css
What this means is the aggregate only changes it's name when the contents of it changes; it increments the counter by one if the change is because of an updated file within, or a new name if a file was added/removed as this will generate a new MD5 hash.
Doing this query one can see where everything is used and what files change the most often
With this logic one can automatically make smarter bundles in the future. Put files that don't change very often in one bundle; put frequently changing files in another. Create a most commonly used bundle. This is one of the next steps to take & I plan on making the sub module in the future after I'm able to analyze the data.
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commented#1073152: documentation: Add php 5 requirement for csstidy library - document php 5 for css compression
#1066446: .htaccess generation & readme - document htaccess generation
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedcommitted this patch
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedcommitted this patch