Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

CSS/JS Aggregation Retention

No security coverage Under active development 22 sites

This module restores a time-based garbage collection for CSS and JavaScript aggregate files. It prevents the complete deletion of aggregate directories during cache rebuilds, reinstating the previous behavior of only removing stale files.

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

Ask your assistant about CSS/JS Aggregation Retention

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Jun 2025
Latest release
5 months ago
Releases (12 mo)
2
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.0-alpha3 Pre-release 10–11 Apr 25, 2026
1.0.0-alpha2 Pre-release 10–11 Feb 7, 2026
1.0.0-alpha1 Pre-release 10–11 Jun 12, 2025
1.x-dev Dev 10–11 Jun 12, 2025