AppserverIo\Appserver\PersistenceContainer\Doctrine\V2\CacheFactories\RedisCacheFactory::get PHP Method

get() public static method

Return's the new cache instance.
public static get ( array $configuration = [] ) : CacheProvider
$configuration array The cache configuration
return Doctrine\Common\Cache\CacheProvider The cache instance
    public static function get(array $configuration = array())
    {
        if (extension_loaded('redis')) {
            $redis = new \Redis();
            $redis->connect($configuration[CacheKeys::HOST]);
            $cache = new RedisCache();
            $cache->setRedis($redis);
            return $cache;
        }
    }
RedisCacheFactory