From 6931cd08c4707f31c1c729d31ec5b0cfed64307d Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Thu, 10 Apr 2014 04:02:34 +0200 Subject: [PATCH] DDC-3078 - using an explicit CacheInstantiator interface to replace callable cache instantiators --- lib/Doctrine/ORM/Cache/CacheInstantiator.php | 41 ++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 lib/Doctrine/ORM/Cache/CacheInstantiator.php diff --git a/lib/Doctrine/ORM/Cache/CacheInstantiator.php b/lib/Doctrine/ORM/Cache/CacheInstantiator.php new file mode 100644 index 000000000..a88442b24 --- /dev/null +++ b/lib/Doctrine/ORM/Cache/CacheInstantiator.php @@ -0,0 +1,41 @@ +. + */ + +namespace Doctrine\ORM\Cache; + +use Doctrine\ORM\EntityManagerInterface; + +/** + * Contract for building second level cache instances. + * + * @since 2.5 + * @author Marco Pivetta + */ +interface CacheInstantiator +{ + /** + * Build timestamp cache region + * + * @param EntityManagerInterface $entityManager + * + * @return \Doctrine\ORM\Cache + */ + public function getCache(EntityManagerInterface $entityManager); +}