developr
Active member
Dear Community,
I configured Redis Cache in config.php but it seems that Redis doesn't work out of the box with XF2.
In XF1 forums I'm using the Addon from Xon (also exists for XF2) and this work very well.
I checked the RDB with redis-cli and there is a big difference in amount of keys from XF1/XF2 after flushing RDB.
# Keyspace
db4:keys=37,expires=37,avg_ttl=1803293 (XF2)
db5:keys=6357,expires=6357,avg_ttl=1692423 (XF1)
Is my config correct?
I configured Redis Cache in config.php but it seems that Redis doesn't work out of the box with XF2.
Code:
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'Redis';
$config['cache']['config'] = [
'directory' => '/var/htdocs/internal_data/cache',
'server' => '127.0.0.1',
'host' => '127.0.0.1',
'port' => 6379,
'compress_data' => 6,
'connect_retries' => 2,
'use_lua' => true,
'read_timeout' => 1,
'timeout' => 1,
'database' => 2,
'serializer' => 'igbinary'
];
$config['cache']['cacheSessions'] = true;
In XF1 forums I'm using the Addon from Xon (also exists for XF2) and this work very well.
I checked the RDB with redis-cli and there is a big difference in amount of keys from XF1/XF2 after flushing RDB.
# Keyspace
db4:keys=37,expires=37,avg_ttl=1803293 (XF2)
db5:keys=6357,expires=6357,avg_ttl=1692423 (XF1)
Is my config correct?