I use css and js aggregation for increase the speed of a drupal 7 website. Now, when I log in with an user A, four news files (one css and one js) are added in the files website directory. (for each website page) Then, when I log in with an user B, four news files (one css and one js) are added in the files website directory. ...etc

I'm afraid because the website will have many thousand of users. So, there will be huge number of css/js files.

When theses files are deleted ? Can I configure that ?


As noted in the post you found:

They will be deleted automatically 30 days (or whatever your drupal_stale_file_threshold variable is set to) after they were created via drupal_clear_css_cache() and drupal_clear_js_cache().

If you are going to have many thousands of users worrying about file system performance at this stage is likely getting ahead of yourself. Depending on your hosting setup you are more likely to run into other kinds of performance issues (PHP, database, fewer non-file caches, etc) before the file system becomes the bottleneck. You may indeed need to solve that problem eventually but it is unlikely to be the first challenge you need to overcome.


I can second this. My experiences with Drupal's build-in caching system are not that good - I would moreover suggest you using minified .CSS and .JS files by default and/or compressing them on server-side (gzip, JSmin & co.) - .htaccess-examples for doing so can be found easily on Google (although these technologies depend quite much on your server-environment)!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.