Manual:$wgLocalisationCacheConf
Appearance
From mediawiki.org
This page is a translated version of the page Manual:$wgLocalisationCacheConf and the translation is 64% complete.
Outdated translations are marked like this.
| Кэш сообщений: $wgLocalisationCacheConf | |
|---|---|
| Конфигурация кэширования локализации. |
|
| Введено в версии: | 1.16.0 (r52503) |
| Удалено в версии: | всё ещё используется |
| Допустимые значения: | (array) |
| Значение по умолчанию: | смотри ниже |
| Другие настройки: По алфавиту | По функциональности | |
Подробнее
Позволяет настроить поведение кэша локализации. Конфигурация представлена в виде ассоциатитвного массива:
- class - используемый класс.
- store - Место хранение кэша. Может быть 'files', 'db' или 'detect'.
- files — кэш будет использовать CDB файлы в директории указанной
$wgCacheDirectoryThis is significantly faster than storing data into the database (see discussion) - db — будет использована база данных
- files — кэш будет использовать CDB файлы в директории указанной
- 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
- detect — если установлена
$wgCacheDirectory, в качестве хранилища будут использоваться файлы (files). В противном случае база данных (db).
- detect — если установлена
- storeClass - хранит имя класса для работы с хранилищем. Если указано имя класса, то "store" игнорируется. Built-in options: LCStore interface
- storeDirectory - If the store class puts its data in files, this is the directory it will use. If this is false,
$wgCacheDirectorywill be used. - manualRecache - нужно установить в true, чтобы отключить инвалидацию кэша по запросу через веб. Используйте maintenance/rebuildLocalisationCache.php для обновления кэша.
Значение по умолчанию
Версия 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, ];