protected function createClient(Repository $config)
    {
        $server     = trim($config['host']);
        $port       = intval($config['port']);
        $timeout    = floatval($config['timeout']);
        $persistent = boolval($config['persistent']);
        $password   = isset($config['password']) ? $config['password'] : '';
        $redis      = new Redis();
        try {

            if ($persistent) {
                $result = $redis->pconnect($server, $port, $timeout);
            } else {
                $result = $redis->connect($server, $port, $timeout);
            }

            if ('' != $password) {
                $result = $redis->auth($password);
            }

            if (false == $result) {
                throw new RedisException("Redis Server can not be connection({$server}:{$port}:{$timeout})");
            }
        } catch(Exception $ex) {
            throw new RedisException($ex->getMessage(), $ex->getCode());
        }

        $redis->_prefix($this->prefix);

        return $redis;
    }