- If decompression of fetched content fails, just fail the cache get request. This should be a safe trade-off as if the key returns nothing XF stack should regenerate it.
- Makes changing compression type a cache flush rather than rendering the site useless until Redis is manually flushed.
- Track upstream components:
- Prevent option compress_threshold < 1 to avoid errors compressing empty strings
- Support LZ4 "high compression" as a integer (recomment a value of 4-6 for compress_data)
- Support for using ElastiCache Cluster replica nodes for reads. See For details.
- Major update to redis library fixing a number of inconsistencies between pure php & php-extension modes.
- This is not a breaking change for my redis add-ons.
- All unit tests should pass
- For custom code, the following redis commands have breaking changes:
- pipeline/multi/exec fixes
- Impacts; hmget/hgetall/info/ttl/scan/sscan/hscan/zscan/zrangebyscore/zrevrangebyscore/zrange/zrevrange
- zrange/zrevrange in php extension mode now works.
- hmget now returns consistent data format for all combinations of; normal/pipeline/multi with pure-php/extension.
- Errors from Redis are now prefixed with "ERR " in both pure-php like from the php extension.
- Improved logic around closing the connection to Redis (should make persistent mode stable)
- In php 7.x, with the php extension, pub/sub subscribing can cause memory corruption.
- 3.1.4RC3 is known to fix this.
- Sync with latest upstream redis php bindings
- By default the Zend Cache "tags" support is disabled as XenForo does not use it and it introduces additional write operations for every cache entry or session to support it.
$config['cache']['backendOptions']['enable_tags'] = true;
- Update backend redis connector library.
- Bugfix pure php connector, only impacts custom add-ons directly calling the redis library.
- load_from_slaves option can now be 2 to include the master in the list of read-only instances to connect to.
This update synchronizes with the Credis and Cm_Cache_Backend_Redis library's upstream, which results in several breaking changes in configuration.
This is a breaking change if you use sentinel support
The following configuration keys have been renamed:
A new option has been introduced:
- sentinel_master_set renamed to sentinel_master
- slave-select renamed to slave_select_callable
- sentinel_persistent renamed to sentinel, which is now an arrary; ie array('persistent' => true)
- Checks the redis master is actually a master, not required if you are loading from a slave or can accept errors when the master redis instance falls over.
- The sentinel option supports the following arguments, if the option doesn't exist falls back to the parent option in 'backendOptions':
Example of changes in configuration:
$config['cache']['backendOptions'] = array( ... 'sentinel_master_set' => 'mymaster', 'sentinel_persistent' => true, 'slave-select' => 'preferLocalSlaveLocalDisk', ...
$config['cache']['backendOptions'] = array( ... 'sentinel_master' => 'mymaster', 'sentinel' => array('persistent' => true), 'slave_select_callable' => 'preferLocalSlaveLocalDisk', ...
- Option "slave-select" can now be a closure or a string. Default is "preferLocalSlave".
- String options:
- preferLocalSlave - fetches IP's via a shell exec
- preferLocalSlaveLocalDisk - fetches IP's via a shell exec, but caches to /tmp/local_ips
- preferLocalSlaveAPCu - fetches IP's via a shell exec, but caches to APCu
- NOT RECOMMENDED
- New option 'sentinel_persistent' (true/false, uses 'persistent' option if 'sentinel_persistent' is null or does not exists)
- Allow separate persistent connections options for sentinel and for master/slaves.