Redis Cache By Xon

Redis Cache By Xon 2.17.2

No permission to download
@Liam W should be fixed now.

The CSS output was being cached with a CHARSET header to permit output gz'ed data from redis to the network without any re-encoding, but I didn't catch there was cases it was consumed assuming the Charset header wasn't there.
 
Hi @Xon what's the advantage of using your add-on over the out-of-box Redis cache support in XF2? I want good performance but would also avoid complicated setup if I can.
 
Hi @Xon what's the advantage of using your add-on over the out-of-box Redis cache support in XF2? I want good performance but would also avoid complicated setup if I can.
This add-on has a pure-php redis client implementation where the out-of-box Redis support requires the php redis extension. That php extension can also be used by this add-on. It also supports querying read-only slaves, and redis sentinel for high-availability.

A number of my other add-on's depend on this redis extension for implementing redis support rather than more complex database queries.
 
After I used this addon, prefix filter is no work on thread list view (It will show all prefixes threads until I disable the addon).
Tested in rc2 & rc3.
 
@Xon
Please, what will be equivalent code for xf2 version (this is from my config.php from xf1)?

Code:
// START Redis configuration //
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
'caching' => true,
'cache_id_prefix' => 'xfredis_',
'automatic_serialization' => false,
'lifetime' => 0
);

$config['cache']['backend'] = 'Redis';
$config['cache']['backendOptions'] = array(
'server' => '127.0.0.1',
'port' => 6379,
'connect_retries' => 2,
'use_lua' => true,
'compress_data' => 2,
'read_timeout' => 1,
'timeout' => 1,
);
require(XenForo_Application::getInstance()->getConfigDir().'/SV/RedisCache/Installer.php');
// END Redis configuration //
 
@Xon
Please, what will be equivalent code for xf2 version (this is from my config.php from xf1)?

Something like:
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' => 2,
'read_timeout' => 1,
'timeout' => 1,
//        'serializer' => 'igbinary',
//        'serializer' => 'php',
);
// END Redis configuration //

Note; you can no longer set the default cache life time, and you can pick which serializer you want to use. igbinary is generally faster on reads and uses less space.
 
you can pick which serializer you want to use. igbinary is generally faster on reads and uses less space
so just remove double slash in front of this par to enable it, and leave php serializer disabled?
Code:
//        'serializer' => 'igbinary',

you can no longer set the default cache life time
In your above example you sort it out or should I change something more regarding it?

So final code would be:

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' => 2,
'read_timeout' => 1,
'timeout' => 1,
'serializer' => 'igbinary',
//        'serializer' => 'php',
);
// END Redis configuration //

And that above I should insert in new config php (after upgrading xf to v.2 and after I upgrade this addon from version for xf1 to xf2)
 
In your above example you sort it out or should I change something more regarding it?
You can uncomment the "igbinary" line, but it requires the php igbinary extension (duh). And it will cause your site to break if you switch to it without having the php extension.

If you do change the serializer setting, make sure you flush the cache or it will break your site.

And that above I should insert in new config php (after upgrading xf to v.2 and after I upgrade this addon from version for xf1 to xf2)
Yes.

You probably want to-do a FLUSHALL between upgrading from XenForo 1.x to XenForo 2.x as none of the cache entries will be usable.
 
So php redis is for 'serializer' => 'php', or I do not understand?
I have redis installed and php redis (PECL) installed.
Should that be enough, or should I also have to install php igbinary extension?

If it is one or another, how to enable one and disable another one?
 
Code:
# php --ri redis

redis

Redis Support => enabled
Redis Version => 3.1.4
Available serializers => php, igbinary

So I think igbinary is installed.
So part of config.php it should be like this?

Code:
'serializer' => 'igbinary',
//        'serializer' => 'php',
 
@Xon Xenforo v2 already support Redis Cache. So What are different performance benefit we can get from this add-on?
Xenforo 2's redis provider requires phpredis and doe not have the following:
  • A pure php redis connector
  • High availability support
  • Exposes redis cache object for use for use by other add-ons
  • Implements some minor caching of forum thread counts
 
Xenforo 2's redis provider requires phpredis and doe not have the following:
  • A pure php redis connector
  • High availability support
  • Exposes redis cache object for use for use by other add-ons
  • Implements some minor caching of forum thread counts

So we have some issues here from redis. Does the issue still remains with this add-on?
 
Using this add-on or just pure php-redis extension (and the bundled XF redis support), isn't going to make a difference for that issue.
 
Top Bottom