Manual:$wgCacheEpoch

From MediaWiki.org
Jump to: navigation, search
This page is a translated version of the page Manual:$wgCacheEpoch and the translation is 20% complete.

Other languages:
English • ‎español • ‎français • ‎日本語 • ‎polski • ‎中文
Cache: $wgCacheEpoch
Set this to current time to invalidate all prior cached pages.
導入されたバージョン: pre 1.1.0
除去されたバージョン: 使用中
可能な値: Date/Time string
既定値: '20030516000000'
他の設定: アルファベット順 | 機能順

詳細

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, which was generated using {{CURRENTTIMESTAMP}}:

$wgCacheEpoch = 20171017182341;

If you are using Linux 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 $wgInvalidateCacheOnLocalSettingsChangeManual:$wgInvalidateCacheOnLocalSettingsChange to automatically invalidate cache whenever "LocalSettings.php" is modified.

関連項目