Manuel:$wgCacheEpoch
Jump to navigation
Jump to search
Cache: $wgCacheEpoch | |
---|---|
Set this to current time to invalidate all prior cached pages. |
|
Introduit dans la version : | pre 1.1.0 |
Retiré dans la version : | Encore utilisé |
Valeurs autorisées : | Date/Time string |
Valeur par défaut : | '20030516000000' |
Autres paramètres : Alphabétique | Par Fonction |
Détails
Set this to current time to invalidate all prior cached pages. Affects both client- and server-side caching, including assets controlled by the ResourceLoader.
For a quick copy-paste you can use the following line, whose timestamp is generated via {{CURRENTTIMESTAMP}}
:
$wgCacheEpoch = 20210123105514;
Si vous êtes sur un système de type Unix, vous pouvez obtenir la date actuelle en entrant ceci sur la ligne de commande :
date +%Y%m%d%H%M%S
To force a file, such as "LocalSettings.php" to be re-read when touched, you can use the following code (MW < 1.17):
# When you make changes to this configuration file, this will make sure that cached pages are cleared.
$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
Since version 1.17 of MediaWiki, you should use
$wgInvalidateCacheOnLocalSettingsChange
to automatically invalidate cache whenever "LocalSettings.php" is modified.