Redis Cache By Xon

Redis Cache By Xon 2.17.2

No permission to download
@Sunka How to igbinary is installed? I have igbinary installation but Available serializers not have igbinary

Code:
# php --ri redis

redis

Redis Support => enabled
Redis Version => 3.1.5
Available serializers => php

yTUsMbT4RNmk8-G0GT16rQ.png
 
You active using igbinary via this line in your config.php file:
PHP:
$config['cache']['config']['serializer'] = 'igbinary';

So its not up in Available serializers => ? Also How to do text redis memory or usage? Can use redis and apc same time?
 
So its not up in Available serializers => ? Also How to do text redis memory or usage? Can use redis and apc same time?
Available serializers are only used by php native session serialization, which XenForo does not use.

You can only use one cache system at a time with XenForo.
 
@Sunka How to igbinary is installed? I have igbinary installation but Available serializers not have igbinary

Code:
# php --ri redis

redis

Redis Support => enabled
Redis Version => 3.1.5
Available serializers => php

yTUsMbT4RNmk8-G0GT16rQ.png
Acivate it like @Xon said. In my config.php you can see that it is activted and php serializer is disabled

PHP:
$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',
......
 
Acivate it like @Xon said. In my config.php you can see that it is activted and php serializer is disabled

PHP:
$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',
......

How to check redis memory usage? Checking Free and Used memory? Do you use web interface to manage and monitor your Redis?
 
@Xon Does this add-on required PHP Handler DSO? As I know PHP OPCode caching options work with suPHP but note work eAccelerator, XCache, APC. PHP handler like DSO or FastCGI will work memory based cache.
 
@Xon Does this add-on required PHP Handler DSO? As I know PHP OPCode caching options work with suPHP but note work eAccelerator, XCache, APC. PHP handler like DSO or FastCGI will work memory based cache.
Nope.

External caching options (redis/memcache) doesn't care about how php is run (cli/php-fpm/suPHP/etc), they simply connect to the store and fetch data like it was another database.
 
This functionality hasn't been ported yet.

Do you have plan adding this functionality? Also add ability can Flush cache.

Does my config.php Configuration correct? Do you have any setting recommendation for performance improve? Does enabling option Count Moderated Threads will help performance improvement?

Code:
// Enable serializers is igbinary
$config['cache']['config']['serializer'] = 'igbinary';

// 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 //

Also your add-on "Redis View Counters" and "Redis Flood Check" functionality does have this add-on? So we does not need install lot of add-on based on Redis. Please make all Redis thing in one add-on without separate add-on installation.
 
Do you have plan adding this functionality? Also add ability can Flush cache.
Probably in a few weeks or so, I'm finishing off some updates to https://atelieraphelion.com so both XenForo 1 and XenForo 2 versions of the same add-on can be sold, and some other paid work.

Does my config.php Configuration correct? Do you have any setting recommendation for performance improve? Does enabling option Count Moderated Threads will help performance improvement?

Code:
// Enable serializers is igbinary
$config['cache']['config']['serializer'] = 'igbinary';

// 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 //
You don't need the first igbinary line, as it is done in the bulk setting of $config['cache']['config'], you can increase compress_data from 2 => 4 (or 6) without an issue.

Also your add-on "Redis View Counters" and "Redis Flood Check" functionality does have this add-on? So we does not need install lot of add-on based on Redis. Please make all Redis thing in one add-on without separate add-on installation.
I currently don't have any plans to collapse the add-ons into a 'bulk' pack.
 
You don't need the first igbinary line, as it is done in the bulk setting of $config['cache']['config'], you can increase compress_data from 2 => 4 (or 6) without an issue.

So is this correct without line $config['cache']['config']['serializer'] = 'igbinary'; adding 'compress_data' => 6,? Do we also need increase 'connect_retries' => 2,

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',
);
// END Redis configuration //
 
No problem at all @Xon ;)(y)
What will be "proper" settings for that 3 options in my case?
I think the issue is it doesn't expire the cache after you move a lot of threads so it is noticable. Maybe drop the 'small forum' cache to 30 or even 0 seconds.
 
@Xon Some Redis Information are not Showing. Please can you add ability can Flush cache?


PD5S-5EKS76W6T7JnOzzvg.png


Also getting Server error log.

Code:
ErrorException: [E_NOTICE] Undefined offset: 0 src/addons/SV/RedisCache/Repository/Redis.php:42

Generated by: Nirjon Feb 3, 2018 at 4:14 PM

Stack trace

#0 src/addons/SV/RedisCache/Repository/Redis.php(42): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/nadda/pub...', 42, Array)
#1 src/addons/SV/RedisCache/XF/Admin/Controller/Index.php(13): SV\RedisCache\Repository\Redis->insertRedisInfoParams(Object(XF\Mvc\Reply\View), NULL)
#2 src/XF/Mvc/Dispatcher.php(249): SV\RedisCache\XF\Admin\Controller\Index->actionIndex(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Index', 'Index', 'html', Object(XF\Mvc\ParameterBag), '', Object(SV\RedisCache\XF\Admin\Controller\Index), NULL)
#4 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#6 src/XF.php(328): XF\App->run()
#7 admin.php(13): XF::runApp('XF\\Admin\\App')
#8 {main}

Request state

array(4) {
  ["url"] => string(10) "/admin.php"
  ["referrer"] => string(48) "/admin.php?redis-info/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Last edited:
  • Like
Reactions: Tom
Top Bottom