Resource icon

Unmaintained Zend Redis Cache 1.6.0

No permission to download
  • 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.
  • Update examples of how to get a master/slave instance
    • Document load_from_slave option
  • Load cached forum thread count from slave redis if possible
  • Like
Reactions: Sunka
Updated configuration samples, and tightened up the FAQ. Next release will have the samples and README in the release also updated.

The minimum supported Redis version is now v3.0.0, but it will continue to work with older features. It just means the 'use_lua' option can now be recommended by default.

Please note; the minimum example has changed:
Code:
$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,
    );
The extra timeout options and retry options add a measure of self-healing.
  • Prevent "Undefined index: moderated" error with some custom add-ons when forum count caching is enabled.
  • When loading cached CSS; if loading from the slave failed, try loading from the master before regenerating css.
  • When selecting a slave, actually use the cached list of local machine IPs.
    • This code is currently Linux only.
  • Updated Readme to document that the 'prefer local slave' option is currently Linux only.
  • Relicense add-on code from Unlicence to MIT licence.
  • Ensure loading from a slave is disabled from the AdminCP
  • Ensure loading from a slave is disabled on a CSS cache-miss.
  • "Load from slave" option now supported for front-end read workloads (excludes admin pages)
    • This means stale reads are possible!
  • Option to load from a local slave, instead of hitting a remote slave.
    • APCu is used to store the list of local IPs fetched via
      Code:
      shell_exec("hostname --all-ip-addresses")
    • If someone knows of a better way of getting all machine IPs vai PHP, please tell me.
  • Semi-private User Activity add-on is supported, so reads hit the slave.

Strongly recommend using Session Cache add-on to split sessions onto another instance of Redis on a different replication topology.

Limitations:
  • Connects to the Redis master, even if this isn't required in the request.
  • No consideration on outstanding replication latency when picking the slave, relies on the Sentianl cluster todo this.
  • Will send cached session reads to the slave, use the Session Cache add-on to prevent/control this.
  • Use xen:number when displaying redis stats
  • Do not display instantaneous upload/download traffic if the backend Redis version doesn't support it (ie pre-3.0)
Redis Cache
  • Add-on compatibility tweak
  • Bugfix support for currently undocumented 'load_from_slaves' option which allows issuing loads to slaves when running in HA.
    • Doesn't work 100% well with sessions due to latency.
  • Attempt to reduce latency warnings or broken pipe due to timeouts.
    • Tweak redis command usage to block less by fetching less data at once when invalidating css caches
  • Track latest upstream libraries
Top Bottom