Redis Cache By Xon

Redis Cache By Xon 2.17.2

No permission to download
Xon updated Redis Cache By Xon with a new update entry:

2.2.0 - Feature/Maintenance update

  • Support zstd compression
  • New retry_reads_on_master option, when a read to the slave-redis instance fails (ie due to the redis instance still loading data), reads will fail-back to the master instance.
  • Confirm php 7.3 compatibility for pure-php redis connector
  • Compat bugfix for phpredis-v3 for exists() function. phpredis-v3 returns a bool, credis/phpredis-v4 return an int, this ensures all backend redis...

Read the rest of this update entry...
 
I had version 2.1.5

In 2.2.0 and xF 2.0.7 I have error:
The following errors must be resolved before continuing:
  • This add-on cannot be installed/upgraded because the following files are missing: src/addons/SV/RedisCache/_data/content_type_fields.xml.
 
Last edited:
Is this how it should work, I enabled addon and copied this to my x1-config file:

Code:
<?php

$config['db']['host'] = 'localhost';
$config['db']['port'] = 'XXXXXXX';
$config['db']['username'] = 'XXXXXXX';
$config['db']['password'] = 'XXXXXXX';
$config['db']['dbname'] = 'XXXXXXX';


$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xfs8_';
$config['cache']['backend'] = 'File';
/* $config['cache']['backendOptions'] = array(
    'compression' => false,
    'servers' => array(
        array(
            // your memcached server IP /address
            'host' => '127.0.0.1',
            
            // memcached port
            'port' => 11211,
        )
    )
);
*/

// setup redis caching
// $config['cache']['enabled'] = true;
$config['cache']['provider'] = 'SV\RedisCache\Redis';
// all keys and their defaults
$config['cache']['config'] = array(
        'server' => '127.0.0.1',
        'port' => 6379,
        'timeout' => 2.5,
        'persistent' => null,
        'force_standalone' => false,
        'connect_retries' => 1,
        'read_timeout' => null,
        'password' => null,
        'database' => 0,
        'compress_data' => 1,
        'lifetimelimit' => 2592000,
        'compress_threshold' => 20480,
        'compression_lib' => null, // dynamically select first of; snappy,lzf,l4z,gzip IF EMPTY/null
        'use_lua' => false,
        'serializer' => 'igbinary', // to disable set ot 'php'
        'retry_reads_on_master' => false,
        );


$config['superAdmins'] = 'XXXXXXX';

if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }
 
@Neso please read this add-on's FAQ and the XF2 FAQ. You don't need so many options set in the $config['cache']['config'] block

Remove these lines;
Code:
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xfs8_';
$config['cache']['backend'] = 'File';

The cache_id_prefix line has been replaced with $config['cache']['namespace'] = 'xfs8_';

Additionally the line;
Code:
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }
Is not required in XF2, and is horribly insecure if a user is able to directly access your site.
 
Tnx. changed, bellow is how it look now.

In admin show: In xenforo admin it show this: https://s3.amazonaws.com/upload.screenshot.co/4a51b3ffec is that OK.

My forum has over 500 000+ threads, 1.900.000 posts and 660 000+ members do I need to tweak anything in config for better caching, servers has huge amount of memory 250 GB DDR4

Code:
<?php

$config['db']['host'] = 'localhost';
$config['db']['port'] = 'XXXXXX';
$config['db']['username'] = 'XXXXXX';
$config['db']['password'] = 'XXXXXX';
$config['db']['dbname'] = 'XXXXXX';

// setup redis caching
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'SV\RedisCache\Redis';
// all keys and their defaults
$config['cache']['config'] = array(
        'server' => '127.0.0.1',
        'port' => 6379,
        'timeout' => 2.5,
        'persistent' => null,
        'force_standalone' => false,
        'connect_retries' => 1,
        'read_timeout' => null,
        'password' => null,
        'database' => 0,
        'compress_data' => 6,
        'lifetimelimit' => 2592000,
        'compress_threshold' => 20480,
        'compression_lib' => null, // dynamically select first of; snappy,lzf,l4z,gzip IF EMPTY/null
        'use_lua' => false,
        'serializer' => 'igbinary', // to disable set ot 'php'
        'retry_reads_on_master' => false,
        );


$config['superAdmins'] = 'XXXXXX';
 
Possibly this for starters, "While XenForo 2 has a redis connector, it requires phpredis. This add-on does not."
 
I read it :-). But in most cases this addon does not work on shared hosting. So most of the people which want to use your addon have dedicated server and there it is easy to install the module php-redis.

I can't believe that there is no other benefit of your addon because it is much easier to install php-redis instead of coding this addon :-).
 
This add-on was coded before XF2 bundled the default redis connector, which supports a simple single master connection without master-slave or high-availability support. This add-on support master-slave and Redis's sentinel-based high-availability.

Additionally I have a number of other add-ons which depend on this one.
 
Xon updated Redis Cache By Xon with a new update entry:

2.3.0 - Feature update

  • New option to default disable XenForo's individual templating css caching.
    • XenForo2 provides per-template css caching which is vulnerable to "thundering herd" cache slamming by introducing unexpected write load which is vulnerable to MySQL locking via insert ... on duplicate key update.
    • This is only an issue for sites which experience large numbers of concurrent users

Read the rest of this update entry...
 
Last edited:
@Xon does need upload files config.redis-example.php? Also where the New option to default disable XenForo's individual templating css caching?
 
@Xon does need upload files config.redis-example.php?
Nope, that is just an example file.

Also where the New option to default disable XenForo's individual templating css caching?
Under performance, but with XenForo 2 you can find all options owned by an add-on by simple clicking on "options" on the add-ons control dropdown.
 
Hello,
I have redis with my shared hosting. I even turned it on. I must have one of the best 6$ per month hosting :).
Do you sugges another cache to be turned on with this addon ?
 
Top Bottom