concrete/src/Cache/Driver/RedisStashDriver.php
protected function setOptions(array $options = [])
    {
        $options += $this->getDefaultOptions();
        $this->prefix = !empty($options['prefix']) ? $options['prefix'] : null;
        // Normalize Server Options
        $servers = [];
        foreach ($this->getRedisServers(array_get($options, 'servers', [])) as $server) {
            $servers[] = $server;
        }
        // Get Redis Instance
        $redis = $this->getRedisInstance($servers);

        // select database - we use isset because the database can be 0
        if (isset($options['database'])) {
            $redis->select($options['database']);
        }
        if (!empty($options['prefix'])) {
            $redis->setOption(\Redis::OPT_PREFIX, $options['prefix'] . ':');
        }

        $this->redis = $redis;
    }
protected function setOptions(array $options = [])
    {
        $options += $this->getDefaultOptions();
        $this->prefix = !empty($options['prefix']) ? $options['prefix'] : null;
        // Normalize Server Options
        $servers = [];
        foreach ($this->getRedisServers(array_get($options, 'servers', [])) as $server) {
            $servers[] = $server;
        }
        // Get Redis Instance
        $redis = $this->getRedisInstance($servers);

        // select database - we use isset because the database can be 0
        if (isset($options['database'])) {
            $redis->select($options['database']);
        }
        if (!empty($options['prefix'])) {
            $redis->setOption(\Redis::OPT_PREFIX, $options['prefix'] . ':');
        }

        $this->redis = $redis;
    }
protected function setOptions ( array $ options = [ ] ) { $ options += $ this -> getDefaultOptions ( ) ; $ this -> prefix = ! empty ( $ options [ 'prefix' ] ) ? $ options [ 'prefix' ] : null ; // Normalize Server Options $ servers = [ ] ; foreach ( $ this -> getRedisServers ( array_get ( $ options , 'servers' , [ ] ) ) as $ server ) { $ servers [ ] = $ server ; } // Get Redis Instance $ redis = $ this -> getRedisInstance ( $ servers ) ; // select database - we use isset because the database can be 0 if ( isset ( $ options [ 'database' ] ) ) { $ redis -> select ( $ options [ 'database' ] ) ; } if ( ! empty ( $ options [ 'prefix' ] ) ) { $ redis -> setOption ( \ Redis :: OPT_PREFIX , $ options [ 'prefix' ] . ':' ) ; } $ this -> redis = $ redis ; }
The options array should contain an array of servers,.

The "server" option expects an array of servers, with each server being represented by an associative array. Each
redis config must have either a "socket" or a "server" value, and optional "port" and "ttl" values (with the ttl
representing server timeout, not cache expiration).

The "database" option lets developers specific which specific database to use.

The "password" option is used for clusters which required authentication.

@param array $options The `concrete.cache.levels.{level}.drivers.redis.options` config item
The options array should contain an array of servers .