This add-on packages Cm_Cache_Backend_Redis and Credis with a little glue-code to provide a Zend Cache for Redis. For best performance, install the php extension: phpredis
Troubleshooting
Please be aware that Redis is very sensitive to latency in a virtual environment. If repeated connection failures or protocol errors are experienced disable any Redis Persistence options.
Read Scaling
With the $config['cache']['backendOptions']['load_from_slave'] option, reads can be deferred to a singular slave instance. This takes all the options of 'backendOptions' (except the slave config)
See the FAQ for configuration samples.
High availability
The Zend component support master/slave setups with Redis Sentinel support. It does not support Redis multi-master clustering.
By default the Zend Cache "tags" support is disabled as XenForo does not use it and it introduces additional operations to support it. To enable;
Licencing
Components licenced under; New BSD
I recommend using Add-on install & upgrade to install this add-on.
Troubleshooting
Please be aware that Redis is very sensitive to latency in a virtual environment. If repeated connection failures or protocol errors are experienced disable any Redis Persistence options.
Read Scaling
With the $config['cache']['backendOptions']['load_from_slave'] option, reads can be deferred to a singular slave instance. This takes all the options of 'backendOptions' (except the slave config)
See the FAQ for configuration samples.
High availability
The Zend component support master/slave setups with Redis Sentinel support. It does not support Redis multi-master clustering.
- Additionally, this add-on implement caching of thread counts in a forum.
- Redis Sentinel support for high-availability (see FAQ for details).
- Optionally, pipelining or loading from a slave can be enabled in XenForo_Model_DataRegistry::getMulti by adding the following lines to config.php. Preferably after setting up the cache.
require(XenForo_Application::getInstance()->getConfigDir().'/SV/RedisCache/Installer.php');
- Loading from a slave (limited opt-in support) is only enabled fro public (ie non-admin) pages.
- APCu or /tmp/local_ips is used to store the list of local IPs fetched via shell_exec for "hostname --all-ip-addresses". If someone knows of a better way of getting all machine IPs, please tell me.
- Note; APCu isn't recommended.
By default the Zend Cache "tags" support is disabled as XenForo does not use it and it introduces additional operations to support it. To enable;
$config['cache']['backendOptions']['enable_tags'] = true;
Licencing
Components licenced under; New BSD
- Cm_Cache_Backend_Redis
- Credis
- XenForo Add-on code
I recommend using Add-on install & upgrade to install this add-on.