Factory/RedisFactory.php
public function get()
    {
        $redis = new Redis;
        $redis->connect($this->config['host'], $this->config['port']);
        $redis->setOption(Redis::OPT_READ_TIMEOUT, -1);
        if ($this->config['database']) {
            $redis->select($this->config['database']);
        }

        return $redis;
    }
public function get()
    {
        $redis = new Redis;
        $redis->connect($this->config['host'], $this->config['port']);
        $redis->setOption(Redis::OPT_READ_TIMEOUT, -1);
        if ($this->config['database']) {
            $redis->select($this->config['database']);
        }

        return $redis;
    }
public function get ( ) { $ redis = new Redis ; $ redis -> connect ( $ this -> config [ 'host' ] , $ this -> config [ 'port' ] ) ; $ redis -> setOption ( Redis :: OPT_READ_TIMEOUT , - 1 ) ; if ( $ this -> config [ 'database' ] ) { $ redis -> select ( $ this -> config [ 'database' ] ) ; } return $ redis ; }
Generate new Predis instance

@return \Redis instance
Generate new Predis instance