From 87a907f9dd420712c7ac0d88a502652fd937a154 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Thu, 10 Apr 2014 03:14:39 +0200 Subject: [PATCH] DDC-3078 - switching cache initialization to use cache instantiator from config --- lib/Doctrine/ORM/EntityManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/EntityManager.php b/lib/Doctrine/ORM/EntityManager.php index 0c1b16b5c..175e3108e 100644 --- a/lib/Doctrine/ORM/EntityManager.php +++ b/lib/Doctrine/ORM/EntityManager.php @@ -166,8 +166,8 @@ use Doctrine\Common\Util\ClassUtils; ); if ($config->isSecondLevelCacheEnabled()) { - $cacheClass = $config->getSecondLevelCacheConfiguration()->getCacheClassName(); - $this->cache = new $cacheClass($this); + $cacheInstantiator = $config->getSecondLevelCacheConfiguration()->getCacheInstantiator(); + $this->cache = $cacheInstantiator($this); } }