Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

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

Activity

Total releases
4
First release
Jun 2025
Latest release
2 months ago
Releases (12 mo)
2
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.0.0-alpha3 Pre-release Apr 25, 2026
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