Nirjonadda
Well-known member
You need to have the$config['cache']['context']['page']['config']
set; or it'll just use defaults and does not fall back on the global config.
This will store CSS to a seperate redis instance on port 6380. There is only any point to adding thePHP:$config['cache']['context']['css'] = [ 'namespace' => 'sv', 'provider' => 'SV\RedisCache\Redis', 'config' => [ 'server' => '127.0.0.1', 'port' => 6380, ], ];
$config['cache']['context']
if they talk to a different backend
Does now correct this code?
Code:
// START Redis configuration //
$config['cache']['enabled'] = true;
$config['cache']['sessions'] = true;
$config['cache']['namespace'] = 'xfredis_';
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = array(
'server' => '127.0.0.1',
'port' => 6379,
'connect_retries' => 2,
'use_lua' => true,
'compress_data' => 6,
'read_timeout' => 1,
'timeout' => 1,
'serializer' => 'igbinary',
// 'serializer' => 'php',
'persistent' => true,
);
// END Redis configuration //
// START Guest page caching //
$config['cache']['enabled'] = true;
$config['pageCache']['enabled'] = true;
$config['cache']['context']['page']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['context']['page']['config'] = ['127.0.0.1'];
// END Guest page caching //
// START CSS caching //
$config['cache']['context']['css'] = [
'namespace' => 'sv',
'provider' => 'SV\RedisCache\Redis',
'config' => [
'server' => '127.0.0.1',
'port' => 6380,
],
];
// END CSS caching //