PHP code example of snakano / cakephp-redis-cluster-cache

1. Go to this page and download the library: Download snakano/cakephp-redis-cluster-cache library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

snakano / cakephp-redis-cluster-cache example snippets


Cache::config('default', array(
    'engine'         => 'RedisClusterCache.RedisCluster',
    'prefix'         => Inflector::slug(APP_DIR) . '_',
    'servers'        => ['127.0.0.1:6379'],
    'password'       => false,
    'timeout'        => 0,
    'read_timeout'   => 0,
    'persistent'     => false,
    'slave_failover' => RedisCluster::FAILOVER_NONE,
));