If you implement this, is there any use for memcached still? I assume PHP also needs to be
told that sessions are in redis?
Jamie Thingelstad
jamie(a)thingelstad.com
mobile: 612-810-3699
find me on AIM Twitter Facebook LinkedIn
On May 24, 2013, at 2:44 PM, Aaron Schulz <aschulz4587(a)gmail.com> wrote:
To use redis as a cache you can have something like:
// requires phpredis extension for PHP
$wgObjectCaches['pecl-redis'] = array(
'class' => 'RedisBagOStuff',
'servers' => array( '127.0.0.1:6379' ),
);
$wgMainCacheType = 'pecl-redis';
This would also require that the redis server would have allkeys-lru for its
eviction policy in redis.conf.
To use redis for a jobqueue, one can have something like:
// requires phpredis extension for PHP
$wgJobTypeConf['default'] = array(
'class' => 'JobQueueRedis',
'redisServer' => '127.0.0.1:6379',
'redisConfig' => array(),
'claimTTL' => 3600
);
This works best if the redis server uses rdb snapshots and/or
append-only-file logging in redis.conf so that jobs are lost with power
outages or restarts.