The #CACHE{time in seconds} tag is used to determine the time period which will pass before the template is freshly recalculated [1]. The time is expressed in seconds. It may be specified as a calculation.

This tag is generally inserted right at the start of template files. In its absence, by default, the period is set at 24 hours (as defined by the _DUREE_CACHE_DEFAUT constant).

For example: #CACHE{24*3600*30} would mean that your template file is refreshed every month (30 days).

Note that the files are not automatically and systematically recalculated at the expiry time as if by a scheduled cron task. The recalculation will actually only occur when a site visitor requests to see a page, at which time the delay period is evaluated, and when necessary, SPIP will then regenerate the page in question and overwrite the one previously stored in the cache (if there, in fact, actually was one already in the cache).


[1var_mode=calcul in the URL updates the cache file for the page

Author Mark Published : Updated : 26/10/12

Translations : عربي, català, English, Español, français, Nederlands