[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [uk] [vi] [zh] Espace de traduction



August 2010

All the versions of this article:

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

Show the template of this page Site powered by SPIP | Translation area | Private area