Skip to content

Commit

Permalink
[DoctrineBundle] made sure that the Doctine cache is not shared betwe…
Browse files Browse the repository at this point in the history
…en different applications
  • Loading branch information
fabpot committed Mar 28, 2011
1 parent 33456e6 commit 3bf6736
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -351,7 +351,10 @@ protected function getEntityManagerCacheDefinition(array $entityManager, $cacheD
}

$cacheDef->setPublic(false);
$cacheDef->addMethodCall('setNamespace', array('sf2orm_'.$entityManager['name']));
// generate a unique namespace for the given application
$namespace = 'sf2orm_'.$entityManager['name'].'_'.md5($container->getParameter('kernel.root_dir'));
$cacheDef->addMethodCall('setNamespace', array($namespace));

return $cacheDef;
}

Expand Down

0 comments on commit 3bf6736

Please sign in to comment.