Mediawiki

From Jon's Wiki
Revision as of 04:07, 24 October 2014 by Johnno (talk | contribs) (Created page with "== Caching == === PHP opcache === Like any PHP application, use the opcache. If your PHP version is < 5.5 install <tt>php5-xcache</tt>, otherwise enable the built-in Zend op...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Caching

PHP opcache

Like any PHP application, use the opcache. If your PHP version is < 5.5 install php5-xcache, otherwise enable the built-in Zend op-cache in php.ini:

[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.revalidate_freq=0
opcache.fast_shutdown=0

MediaWiki file cache

Use the file cache, Luke. It's simple but effective. In LocalSettings.php:

$wgUseFileCache = true;
$wgFileCacheDirectory = "/var/cache/mediawiki";
$wgShowIPinHeader = false; 

And create the appropriate cache directory:

sudo mkdir -p /var/cache/mediawiki
sudo chown www-data:www-data /var/cache/mediawiki