Atrauzzi\LaravelDoctrine\CacheProvider\RedisProvider::initialize PHP Method

initialize() protected method

Sets up and returns the CacheProvider
protected initialize ( $config ) : CacheProvider
$config
return Doctrine\Common\Cache\CacheProvider
    protected function initialize($config)
    {
        $redis = new \Redis();
        $redis->connect($config['host'], $config['port']);
        $redis->select($config['database']);
        $cache = new RedisCache();
        $cache->setRedis($redis);
        return $cache;
    }
RedisProvider