Drupal is a registered trademark of Dries Buytaert

css_js_agg_retention

16 sites No security coverage
View on drupal.org

This module restores time-based garbage collection for CSS and JavaScript aggregates, preventing the complete deletion of aggregate directories during cache rebuilds that was introduced in 10.1.

Background

Drupal 10.1 introduced significant performance improvements to CSS/JS aggregation by implementing lazy generation of aggregate files. However, these changes also modified cache clearing behavior to delete entire /sites/*/files/{css,js} directories during every cache rebuild (drush cr).

While this approach works well for dynamic sites where aggregates can be regenerated on-demand, it creates critical issues for static generators.

This module reinstates the pre-10.1 behavior by preventing wholesale deletion of CSS/JS directories during cache clears and implementing time-based cleanup that only removes genuinely stale files.

Relates issues:

- #3301573: Remove the aggregate stale file threshold and state entry

Activity

Total releases
3
First release
Jun 2025
Latest release
3 weeks ago
Release cadence
120 days
Stability
0% stable

Release Timeline

Releases

Version Type Release date
1.0.0-alpha2 Pre-release Feb 7, 2026
1.0.0-alpha1 Pre-release Jun 12, 2025
1.x-dev Dev Jun 12, 2025