From a790639167f6989dad8503a4e21603ca7302640f Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Thu, 10 Apr 2014 04:04:19 +0200 Subject: [PATCH] DDC-3078 - providing a default cache instantiator implementation --- .../ORM/Cache/DefaultCacheInstantiator.php | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 lib/Doctrine/ORM/Cache/DefaultCacheInstantiator.php diff --git a/lib/Doctrine/ORM/Cache/DefaultCacheInstantiator.php b/lib/Doctrine/ORM/Cache/DefaultCacheInstantiator.php new file mode 100644 index 000000000..43d7df20f --- /dev/null +++ b/lib/Doctrine/ORM/Cache/DefaultCacheInstantiator.php @@ -0,0 +1,41 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\ORM\EntityManagerInterface; + +/** + * Default implementation of the {@see \Doctrine\ORM\Cache\CacheInstantiator}, responsible + * for producing an {@see \Doctrine\ORM\Cache\DefaultCache} + * + * @since 2.5 + * @author Marco Pivetta + */ +class DefaultCacheInstantiator implements CacheInstantiator +{ + /** + * {@inheritDoc} + */ + public function getCache(EntityManagerInterface $entityManager) + { + return new DefaultCache($entityManager); + } +}