I’m developing a site in Drupal 6, and I’m going mad trying to work out why pages (specifically pages containing views), I’m working on locally are caching content instead refreshing the contents of the page, and that of linked js files, I’m relying on for making a mashup – is there a checklist I can check against to be sure I’m not missing when trying to deactivate caching?
These are the steps I’m taking:
On the server:
- set the site to rebuild the theme on each load
- cleared cache using
drush(as in drush @dev cc all`) on each page load - checked that the json output from a view isn’t caching
- disabled any css or js caching in
admin/settings/performance
On Firefox/firebug
- using the web developer extension, disabled the cache
- been refreshing the site using shift-F5 to force a clear of the cache
I’m not using varnish or memcached, nor any other caching modules like boost – it’s straight Apache-PHP through to Drupal and MySQL.
What am I missing here?
The three things you need to do are:
This will make sure all registries and caches except for the menu router will be rebuilt on every page, effectively preventing caching in practice.
If you really need the menu router to be rebuilt on every page (it’s completely unnecessary, as you only need to worry about it when you change your implementation for
hook_menu()orhook_menu_alter()), you could addmenu_rebuild()tohook_init()in a custom module: