src/M6Web/Component/Redis/Manager.php
protected function getRedis($key, $servers = null)
    {
        if (is_null($servers)) {
            $servers = $this->getServerConfig(); // all the servers
        }
        if (0 == count($servers)) {
            throw new Exception("No redis server available ! ");
        }
        $idServer = $this->getServerId($key, $servers);

        if (!($redis = $this->getRedisFromServerConfig($idServer))) {
            $this->notifyEvent('redis_host_on_error', array($idServer));
            // find another server !!!
            unset($servers[$idServer]); // supress the server

            return $this->getRedis($key, $servers); // RECURSION ^^
        }
        $redis->select($this->getCurrentDb());

        return $redis;
    }
protected function getRedis($key, $servers = null)
    {
        if (is_null($servers)) {
            $servers = $this->getServerConfig(); // all the servers
        }
        if (0 == count($servers)) {
            throw new Exception("No redis server available ! ");
        }
        $idServer = $this->getServerId($key, $servers);

        if (!($redis = $this->getRedisFromServerConfig($idServer))) {
            $this->notifyEvent('redis_host_on_error', array($idServer));
            // find another server !!!
            unset($servers[$idServer]); // supress the server

            return $this->getRedis($key, $servers); // RECURSION ^^
        }
        $redis->select($this->getCurrentDb());

        return $redis;
    }
return a Redis object according to the key
@param string $key     cache key
@param array  $servers servers

@throws Exception
@return object