What are the best practices for cache/CSS optimization management in Drupal 5.x?
We keep normal cache enabled, CSS optimization enabled, and JavaScript aggregation disabled (as we have many issues with JS behavior when enabled). The problem is that the sites are visually broken every time we change something in CSS (and remove .css files in /files/css). The client requests the old CSS file whose name is included in the code of the cached page (local/proxy/Drupal cache?). As that file doesn't exist anymore on the server, the client loads the page without CSS. The issue seems to be very important for a multi-site Drupal setup. It seems that the whole /files/css folder is purged every time you enable a new module (internally calling cache/css clear) or when you change Site Configuration/Performance/Optimize CSS files option in any site.
Any thoughts about best practices and this particular "site visually broken" problem?
Thanks
Comments
Clear page cache
We just hit this...tonight in fact. I'm going to try to clear the Drupal page cache with
drupal_clear_css_cache();
drupal_clear_js_cache();
cache_clear_all('*', 'cache_page', TRUE);
on each update. Or you could probably similarly do DELETE FROM {cache_page} and delete the css/js files.
--
Rob Barreca
Drupal Architect
ChipIn, Inc.
Electronic Insight Corporation
Learn how you can contribute to Drupal.