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.



--
View this message in context: 
http://wikimedia.7.x6.nabble.com/Information-on-MW-and-Redis-tp5005659p5005660.html
Sent from the Wikipedia Developers mailing list archive at Nabble.com.

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to