Redis Cache By Xon

Redis Cache By Xon 2.18.2

No permission to download
If you're using Xon's addon, use his recommended settings in the FAQ.

A lot of configuration in there. For example this is my own config but I'm not sure it's perfect or not:

Code:
// === Redis main cache ===
$config['cache']['enabled']   = true;
$config['cache']['provider']  = 'SV\RedisCache\Redis';
$config['cache']['namespace'] = 'xf';

$config['cache']['config'] = [
    'server'            => '127.0.0.1',
    'port'              => 6379,
    'password'          => null,
    'database'          => 0,
    'timeout'           => 2.5,
    'read_timeout'      => 2.5,
    'connect_retries'   => 1,
    'persistent'        => false,
    'force_standalone'  => false,
    'serializer'        => 'php',
    'use_lua'           => true,
    'lifetimelimit'     => 2592000,
    'compress_data'     => 1,
    'compress_threshold'=> 20480,
    'compression_lib'   => null,
    'retry_reads_on_master' => true,
];

// === Guest page cache ===
$config['pageCache']['enabled']  = true;
$config['pageCache']['lifetime'] = 600;

$config['cache']['context']['page']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['context']['page']['config'] = [
    'server'            => '127.0.0.1',
    'port'              => 6379,
    'password'          => null,
    'database'          => 1,
    'timeout'           => 2.5,
    'read_timeout'      => 2.5,
    'connect_retries'   => 1,
    'persistent'        => false,
    'serializer'        => 'php',
    'use_lua'           => true,
    'compress_data'     => 1,
    'compress_threshold'=> 20480,
];
 
Thats definitely not a default config. Why over complicate it?

Is it enough? I just want some performance as you know...

Code:
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = [
    'server' => '127.0.0.1',
    'port' => 6379,
    'database' => 0,
];

$config['pageCache']['enabled'] = true;
$config['cache']['context']['page']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['context']['page']['config'] = [
    'server'            => '127.0.0.1',
    'port'              => 6379,
    'database' => 1,
];
 
Why not just something simple like:

Code:
$config['cache']['enabled'] = true;
$config['cache']['sessions'] = true;
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = [
    'server' => '127.0.0.1',
    'port' => '6379',
    'database' => 0,
    'compress_data' => 3,
    'use_lua' => true,
    'serializer' => 'igbinary',
    'compress_threshold' => 20480,
];

Change your serializer if you don't have the igbinary installed.

add page cache if needed.
 
Back
Top Bottom