Jump to content

MediaWiki-Docker/Configuration recipes/Redis

From mediawiki.org

Redis

[edit]

You can use Redis for performance gains or if you want to test using Redis as a cache backend.


docker-compose.override.yml
services:
  redis:
    image: redis
LocalSettings.php
$wgObjectCaches['redis'] = [
	'class' => 'RedisBagOStuff',
	'servers'=> [ 'redis:6379' ],
];
$wgMainCacheType = 'redis';
$wgSessionCacheType = 'redis';
$wgMainStash = 'redis';
// You can also use Redis for the JobQueue backend.
$wgJobTypeConf['default'] = [
	'class' => 'JobQueueRedis',
	'redisServer' => 'redis:6379',
	'redisConfig' => [],
	'claimTTL' => 3600,
	'daemonized' => true
];