On development platform caching can be a pain. Can I turn it off and will it affect any of the modules that require it?
|
Install the devel module which adds a cache clear option for administrators. You'll find a devel block to add to a region for quick cache clearing, or if you install the admin menu and get a quick menu in the top left for clearing various caches in Drupal. If you like the command line install drush and use the |
||||
|
|
|
If you are using Drupal 7 you can always set your caching to using DrupalFakeCache, which is normally only used during the installation process. To set that, drop the following code snippet in your settings.php:
|
|||
|
|
|
'Performance' page in administration > site configuration will allow you to enable / disable caching of selected site elements. Theme templates are typically cached more persistently but can be flushed within the same 'performance' page. 'Administration menu' module will provide a shortcut in a toolbar if cache flushes need to be done more regularly - during theme dev I find myself constantly flushing. |
|||
|
|
|
In addition to the methods Steve H mentioned, using the Devel module opens up a few more options, including:
With the Devel module and caching turned off under Performance, the only other major cache you'll run into in routine development is the menu router, which can be rebuilt either using Devel or Admin Menu as Steve mentioned. |
|||
|
|
|
One important thing to note is that if you have a lot of stylesheets (either from your theme or from modules), then turning off CSS file optimizing has the potential to break your site in IE. While not actually caching, it's on the same settings page and is often used with caching. The "Flush all caches" link in the admin menu module is fantastic, by the way. |
|||
|
|
As far as I know there aren't any modules that require caching. If you don't want to turn it off you can clear it in the Even with caching disabled Drupal won't recognise new files added to themes until you clear the cache. There's a some information on different ways to clear the cache over at Drupal.org |
|||
|
|
|
If you're using Drupal 6, the "Cache Disable" module can be handy for that task if you do not wish [for some reason] to install heavier modules like Devel. |
|||
|
|
|
Old question, but I just saw it popped up as a related one to a search I was doing. Nearly all of the cache clearing methods end up calling drupal_flush_all_caches in the end. You can play around with calling this in various circumstances in your own code. |
|||
|
|