1
0
mirror of synced 2025-01-29 19:41:45 +03:00

New cache driver definition for Doctrine running in non-dev mode and cache driver is not set.

This cache driver was added with doctrine/common#109
This commit is contained in:
Osman Üngür 2012-04-02 11:57:09 +03:00
parent 5b18718b92
commit 4fc7389b1d

View File

@ -173,6 +173,11 @@ class Setup
$memcache->connect('127.0.0.1');
$cache = new \Doctrine\Common\Cache\MemcacheCache();
$cache->setMemcache($memcache);
} else if (extension_loaded('redis')) {
$redis = new \Redis();
$redis->connect('127.0.0.1');
$cache = new \Doctrine\Common\Cache\RedisCache();
$cache->setRedis($redis);
} else {
$cache = new ArrayCache;
}