I am using Drupal 6. Every time I modify the CSS files, I need to clear the cache to see the updated result, which is a waste of my time. Is there any way to disable the cache system?
Navigate to admin/structure/views/settings/advancedCheck the Disable Views Data Caching option.
And/or install Admin Menu and hover over the Drupal icon in the top left corner, then on "Flush all caches".
The reason the CSS cache needs refreshing is because Drupal optimizes all individual CSS files from various modules and themes into one CSS file which is optimized into a single file.
So that this file is not recompiled every page load, which would loose the benefit of optimization, Drupal needs to know when the CSS file has changed in order to recompile this. At which cache refresh seems like the ideal time. To turn this off - rather than turn off caching completely you can simply:
Go to /admin/settings/performance where there is a field labeled "Optimize CSS files":
Disable this whilst you are doing your development and making changes to your CSS file. Then when in production and most of your CSS is set then you can enable it. I highly recommend the performance gains this brings in the loading of your pages.
I have the administration menu module installed, and it is very easy to empty the cache from here in a single click - have a try...
Also, for the purpose of development you could place the following in your template.php (assuming you're working on a theme).
drupal_flush_all_caches();
See http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_flush_all_caches/6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With