Manual:$wgLocalisationCacheConf/zh
Appearance
消息缓存: $wgLocalisationCacheConf | |
---|---|
Localisation cache configuration. |
|
引进版本: | 1.16.0 (r52503) |
移除版本: | 仍在使用 |
允许的值: | (array) |
默认值: | 参见下方 |
其他设置: 按首字母排序 | 按功能排序 |
Details
Localisation cache configuration. Associative array with keys:
- class - The class to use. May be overridden by extensions.
- store - The location to store cache data. May be 'files', 'db', 'array' or 'detect'.
- If set to "files", data will be in CDB files in the directory specified by
$wgCacheDirectory
.
- If set to "files", data will be in CDB files in the directory specified by
This is significantly faster than storing data into the database (see discussion)
- If set to "db", data will be stored to the database.
- If set to "array", data will be in PHP files that store static arrays in the directory specified by
$wgCacheDirectory
. This is an experimental option.
- If set to "array", data will be in PHP files that store static arrays in the directory specified by
- This is the fastest option when using PHP-FPM and OPcache (without
opcache.file_cache_only
), because OPcache will store these arrays. In other configurations (HHVM or opcache.file_cache_only) this mode has no benefit over "files".
- This is the fastest option when using PHP-FPM and OPcache (without
- If set to "detect", CDB files will be used if
$wgCacheDirectory
is set, otherwise the database will be used.
- If set to "detect", CDB files will be used if
- storeClass - The class name for the underlying storage. If set to a class name, it overrides the
store
setting above. Built-in options: LCStore interface on doc.wikimedia.org - storeDirectory - If the store class puts its data in files, this is the directory it will use. If this is false,
$wgCacheDirectory
will be used. - manualRecache - Set this to true to disable cache updates on web requests. Use maintenance/rebuildLocalisationCache.php instead.
Default value
MediaWiki版本: | ≥ 1.34 |
$wgLocalisationCacheConf = [
'class' => LocalisationCache::class,
'store' => 'detect',
'storeClass' => false,
'storeDirectory' => false,
'storeServer' => [],
'forceRecache' => false,
'manualRecache' => false,
];
MediaWiki版本: | 1.31 – 1.33 |
$wgLocalisationCacheConf = [
'class' => LocalisationCache::class,
'store' => 'detect',
'storeClass' => false,
'storeDirectory' => false,
'manualRecache' => false,
];
MediaWiki版本: | 1.16 – 1.30 |
$wgLocalisationCacheConf = [
'class' => 'LocalisationCache',
'store' => 'detect',
'storeClass' => false,
'storeDirectory' => false,
'manualRecache' => false,
];