Aggregate cache

This project enhances the back end performance of core's CSS and JavaScript aggregation features.

- CSS and JavaScript aggregates are generated using the same lazy creation pattern as image derivative presets.

- This allows css and javascript aggregates to be built by multiple, parallel threads during cold starts. Core currently builds them inline during the page rendering process can add around 900ms to serving pages that do this.

- Removes runtime file_exists() checks for css and js aggregates. These can be very expensive on systems running with NFS file storage or similar and occur on every page request in core.

There's a core patch for these changes at #1014086: Race conditions, stampedes and cold cache performance issues with css/js aggregation, however it's relatively simple to implement them as a module. Reviews of the core patch are welcome.

Instructions for use

No configuration should be necessary, however you need clean URLs and CSS/JavaScript aggregation to be enabled on your site. Otherwise just enable the module. You may need to clear page cache (or varnish if using that) after doing this since aggregate file names will change.

Fast 404s

If using fast 404s, you may need to set the following variable in settings.php:

$conf['404_fast_paths_exclude'] = '/\/(?:(styles|css|js))\//';
Supporting organizations: 

Aggregate cache项目的Drush安装命令:复制到剪贴板



7.x-1.7tar.gz (13.81 KB) | zip (14.75 KB)2016年2月19日发布说明简 | 繁 | 更多


7.x-1.x-devtar.gz (13.38 KB) | zip (14.21 KB)2013年9月30日发布说明简 | 繁 | 更多