Setup:Installation Guide/Advanced/Performance Optimization/ManualRecache: Difference between revisions

(Created page with "{{DISPLAYTITLE:Performance Optimization: ManualRecache of LanguageCache}} To prevent Rebuilding LocalizationCache with every page call, apply the following configuration: {{M...")
Tag: 2017 source edit
 
No edit summary
Tag: 2017 source edit
 
Line 2: Line 2:


To prevent Rebuilding LocalizationCache with every page call, apply the following configuration:
To prevent Rebuilding LocalizationCache with every page call, apply the following configuration:
{{Messagebox|boxtype=Hinweis|Note text=When following these instructions, make sure that the $wgCacheDirectory variable is set in advance. This is already the case in the BlueSpice standard delivery in the file settings.d/005-Directories.php.}}{{Template:Hint|text=This performance optimization achieves the best performance by enabling and configuring [[Setup:Installation Guide/Advanced/Performance Optimization/PHP | opcache in PHP]].}}
{{Messagebox|boxtype=important|Note text=When following these instructions, make sure that the $wgCacheDirectory variable is set in advance. This is already the case in the BlueSpice standard delivery in the file settings.d/005-Directories.php.}}
{{Messagebox|boxtype=note|Note text=This performance optimization achieves the best performance by enabling and configuring [[Setup:Installation Guide/Advanced/Performance Optimization/PHP | opcache in PHP]].}}
In the <code>settings.d</code> folder of your codebase, create the file 006-ManualRecache.php with the following contents:
In the <code>settings.d</code> folder of your codebase, create the file 006-ManualRecache.php with the following contents:
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">

Latest revision as of 15:56, 22 December 2021


To prevent Rebuilding LocalizationCache with every page call, apply the following configuration:

Important!When following these instructions, make sure that the $wgCacheDirectory variable is set in advance. This is already the case in the BlueSpice standard delivery in the file settings.d/005-Directories.php.
Note:This performance optimization achieves the best performance by enabling and configuring opcache in PHP.

In the settings.d folder of your codebase, create the file 006-ManualRecache.php with the following contents:

<?php
$wgLocalisationCacheConf = [
'class' => LocalisationCache::class,
'store' => 'array',
'storeClass' => false,
'storeDirectory' => $wgCacheDirectory,
'manualRecache' => true,
];

Then delete all existing files in the cache folder of your codebase. Then manually re-create the LocalizationCache by entering the following on your console:

php /pfad/zur/installation/maintenance/rebuildLocalisationCache.php --force

Finally, make sure that this is done regularly in the background via cronjob ("Task Scheduler" under Windows). We recommend this twice a day, for example at 6am and 6pm.



To submit feedback about this documentation, visit our community forum.