Resource icon

Zend Redis Cache 1.6.0

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

Feature update release

Redis summary info now added to the AdminCP home page:
capture-png.118339

Read the rest of this update entry...
 
Here is some example configuration for enabling Lua:
Code:
$config['cache']['backendOptions'] = array(
    'server' => '127.0.0.1',
    'port' => 6379,
    'use_lua' => true,
);
 
@Xon
I should edit config php after installing this addon?

My config.php
PHP:
<?php

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

$config['superAdmins'] = '1';
$config['adminLogLength'] = 30;
CMF_Core_Autoloader::getProxy();
$config['enableTfa'] = false;
//$config['enableMail'] = false;
//$config['rebuildMaxExecution'] = 4;
//$config['debug'] = true;
//$config['enableListeners'] = false;


So I have to add this at the end of code?

PHP:
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
'caching' => true,
'cache_id_prefix' => 'xfxx_',
'automatic_serialization' => false,
'lifetime' => 0
);

$config['cache']['backend'] = 'Redis';

$config['cache']['backendOptions'] = array(
'server' => '127.0.0.1',
'port' => 6379,
'use_lua' => true,
);
require(XenForo_Application::getConfigDir().'/SV/RedisCache/Installer.php');

And after all is installed, and addon is configured, I have to flush via terminal - redis-cli FLUSHALL ?


Regarding this from FAQ
Q: Performance - XenForo

Don't double serialize the cached data, make sure 'automatic_serialization' is false!

Code:
$config['cache']['frontendOptions']['automatic_serialization'] = false;

This may break addons which directly talk to the Zend caching layer and bypass XenForo's caching layer.

Where is that option, to set that off if it is enabled?

And for maxmemory setting, what to set? 100MB or less?

  • XenForo - 1.5.1
  • Database - 831 MB (about 126 MB zipped)
  • Number of attachments - 3,601
  • Attachments disk usage - 9,737 MB
  • Addons - 66
  • Posts - 243,337
  • Users - 3,613 (online registered users in peak time is about 50 + guests)
 
@Sunka Yes, you do need to configure your config.php after installing the add-on. Otherwise it'll try to use files you haven't deployed yet!

That config does look right.

And after all is installed, and addon is configured, I have to flush via terminal - redis-cli FLUSHALL ?
You shouldn't need to-do the "redis-cli FLUSHALL" if you are just configuring a cache for the first time.

Where is that option, to set that off if it is enabled?
You've got 'automatic_serialization' set to false already in that config snippet.

And for maxmemory setting, what to set? 100MB or less?
It depends on the number of templates and styles. But 32-64mb should be plenty in most cases.
 
Installed the PECL (confirmed that it installed) for PHP, did a yum install (CentOS 6.7), installed the add-on and used the example data provided by @eva2000 and this is what I get
Code:
CredisException: ERR unknown command 'EVALSHA' - library/Redis/lib/Credis/Client.php:1098
Generated By: Unknown Account, 47 minutes ago
Stack Trace
#0 /home/nginx/domains/thebent.bike/public/library/Redis/Cm/Cache/Backend/Redis.php(271): Credis_Client->__call('evalSha', Array)
#1 /home/nginx/domains/thebent.bike/public/library/Redis/Cm/Cache/Backend/Redis.php(271): Credis_Client->evalSha('1617c9fb2bda7d7...', Array, Array)
#2 /home/nginx/domains/thebent.bike/public/library/Zend/Cache/Core.php(390): Cm_Cache_Backend_Redis->save('a:28:{s:14:"Add...', 'tbb_data_addOns', Array, false)
#3 /home/nginx/domains/thebent.bike/public/library/SV/RedisCache/RedisDataRegistry.php(216): Zend_Cache_Core->save('a:28:{s:14:"Add...', 'data_addOns')
#4 /home/nginx/domains/thebent.bike/public/library/XenForo/Dependencies/Abstract.php(147): XenForo_Model_DataRegistry->getMulti(Array)
#5 /home/nginx/domains/thebent.bike/public/library/XenForo/FrontController.php(127): XenForo_Dependencies_Abstract->preLoadData()
#6 /home/nginx/domains/thebent.bike/public/index.php(13): XenForo_FrontController->run()
#7 {main}
Request State
array(3) {
  ["url"] => string(102) "http://thebent.bike/?app=core&module=search&controller=search&csrfKey=422b35094ca2838767ad9ff5a9d975dc"
  ["_GET"] => array(4) {
    ["app"] => string(4) "core"
    ["module"] => string(6) "search"
    ["controller"] => string(6) "search"
    ["csrfKey"] => string(32) "422b35094ca2838767ad9ff5a9d975dc"
  }
  ["_POST"] => array(0) {
  }
}

In fact, after adding redis to the init scripts (chkconfig redis on) and rebooting - I had to go into rescue mode to remove all references to redis from the RC?.d folders. Think I'll stick with memcached. :p
 
You have Lua scripting enabled (which is disabled by default), but the version of Redis you are using is too old to support it.

What version of Redis where you using? The EVALSHA was added in 2.6.0 (released ~2012), which is quite old.
 
Top Bottom