Manual:$wgInvalidateCacheOnLocalSettingsChange/pl

From Linux Web Expert

Revision as of 03:56, 7 July 2023 by imported>FuzzyBot (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<translate> Cache</translate>: $wgInvalidateCacheOnLocalSettingsChange
Setting this to true will invalidate all cached pages whenever "LocalSettings.php" is changed
<translate> Introduced in version:</translate>1.17.0 (r77878)
<translate> Removed in version:</translate><translate> still in use</translate>
<translate> Allowed values:</translate>(boolean)
<translate> Default value:</translate>true

Szczegóły

Setting this to true will invalidate all cached pages whenever LocalSettings.php is changed. This is useful so that if you install a new extension, any old pages that were cached before the extension was installed are re-rendered.

On high-traffic wikis, this should be set to false, to avoid the need to check the file modification time, and to avoid the performance impact of unnecessary cache invalidations.

In previous versions of MediaWiki, this was done by default in "LocalSettings.php" using the following code:
$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );

Zobacz też