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:
parent
5b18718b92
commit
4fc7389b1d
1 changed files with 5 additions and 0 deletions
|
@ -173,6 +173,11 @@ class Setup
|
||||||
$memcache->connect('127.0.0.1');
|
$memcache->connect('127.0.0.1');
|
||||||
$cache = new \Doctrine\Common\Cache\MemcacheCache();
|
$cache = new \Doctrine\Common\Cache\MemcacheCache();
|
||||||
$cache->setMemcache($memcache);
|
$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 {
|
} else {
|
||||||
$cache = new ArrayCache;
|
$cache = new ArrayCache;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue