Cache: $wgCacheEpoch | |
---|---|
Set this to current time to invalidate all prior cached pages. |
|
Introduced in version: | pre 1.1.0 |
Removed in version: | still in use |
Allowed values: | Date/Time string |
Default value: | '20030516000000' |
Other settings: Alphabetical | By function |
Details
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 = 20230412125921;
If you are using a Unix-like system you can get the current date by entering the following on the command-line:
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.See also
- Manual:$wgInvalidateCacheOnLocalSettingsChange
- Manual:$wgThumbnailEpoch
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.