Refreshing the cache

During normal usage of a SPIP site with public visitors and new articles being published regularly, the cache and the updating of data is handled correctly.
By default (although some plugins are able to alter this behaviour), as soon as SPIP becomes aware of changes to the editorial content in the database, it invalidates the whole page cache. A requested page will then be calculated again from before - or after if using the "Cache Cool" plugin - being served up to the site visitor.

It is often necessary to manually empty the cache when making modifications directly on content files, especially when updating a stylesheet or a JavaScript script which is calculated by a SPIP template if the compression options have been activated.

Remember that:

  • var_mode=calcul in the URL updates the page’s cache
  • var_mode=recalcul (for administrators) in the URL recompiles the template and then updates the page cache.
  • entering the plugin management page ecrire/?exec=admin_plugin recalculates the cache files tmp/cache/charger_*.php for the plugins, which may be lists of files for options, functions or pipelines.
  • the browser has its own private cache, which may be for whole pages or for AJAX elements. The site visitor and any administrator should also think about emptying this cache - it is not necessarily SPIP which is returning a particular unexpected result, as it may be the browser returning data from its own cache. Various instructions for emptying a browser’s local cache are specific to each browser and each platform - please consult your appropriate user guide.

Author Mark Baber Published : Updated : 01/06/10

Translations : English, français, Nederlands