File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/Dflydev/Pimple/Provider/DoctrineOrm Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1313
1414use Doctrine \Common \Cache \ApcCache ;
1515use Doctrine \Common \Cache \ArrayCache ;
16+ use Doctrine \Common \Cache \CacheProvider ;
1617use Doctrine \Common \Cache \MemcacheCache ;
1718use Doctrine \Common \Cache \MemcachedCache ;
1819use Doctrine \Common \Cache \XcacheCache ;
@@ -192,7 +193,13 @@ public function register(\Pimple $app)
192193 return $ app [$ cacheInstanceKey ];
193194 }
194195
195- return $ app [$ cacheInstanceKey ] = $ app ['orm.cache.factory ' ]($ driver , $ options [$ cacheNameKey ]);
196+ $ cache = $ app ['orm.cache.factory ' ]($ driver , $ options [$ cacheNameKey ]);
197+
198+ if (isset ($ options ['cache_namespace ' ]) && $ cache instanceof CacheProvider) {
199+ $ cache ->setNamespace ($ options ['cache_namespace ' ]);
200+ }
201+
202+ return $ app [$ cacheInstanceKey ] = $ cache ;
196203 });
197204
198205 $ app ['orm.cache.factory.backing_memcache ' ] = $ app ->protect (function () {
You can’t perform that action at this time.
0 commit comments