Exception
9 months ago
Logging
9 months ago
Persister
9 months ago
Region
9 months ago
AssociationCacheEntry.php
9 months ago
CacheConfiguration.php
9 months ago
CacheEntry.php
9 months ago
CacheException.php
9 months ago
CacheFactory.php
9 months ago
CacheKey.php
9 months ago
CollectionCacheEntry.php
9 months ago
CollectionCacheKey.php
9 months ago
CollectionHydrator.php
9 months ago
ConcurrentRegion.php
9 months ago
DefaultCache.php
9 months ago
DefaultCacheFactory.php
9 months ago
DefaultCollectionHydrator.php
9 months ago
DefaultEntityHydrator.php
9 months ago
DefaultQueryCache.php
9 months ago
EntityCacheEntry.php
9 months ago
EntityCacheKey.php
9 months ago
EntityHydrator.php
9 months ago
Lock.php
9 months ago
LockException.php
9 months ago
MultiGetRegion.php
9 months ago
QueryCache.php
9 months ago
QueryCacheEntry.php
9 months ago
QueryCacheKey.php
9 months ago
QueryCacheValidator.php
9 months ago
Region.php
9 months ago
RegionsConfiguration.php
9 months ago
TimestampCacheEntry.php
9 months ago
TimestampCacheKey.php
9 months ago
TimestampQueryCacheValidator.php
9 months ago
TimestampRegion.php
9 months ago
index.php
9 months ago
CacheConfiguration.php
51 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\ORM\Cache; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | use MailPoetVendor\Doctrine\ORM\Cache\Logging\CacheLogger; |
| 6 | class CacheConfiguration |
| 7 | { |
| 8 | private $cacheFactory; |
| 9 | private $regionsConfig; |
| 10 | private $cacheLogger; |
| 11 | private $queryValidator; |
| 12 | public function getCacheFactory() |
| 13 | { |
| 14 | return $this->cacheFactory; |
| 15 | } |
| 16 | public function setCacheFactory(CacheFactory $factory) |
| 17 | { |
| 18 | $this->cacheFactory = $factory; |
| 19 | } |
| 20 | public function getCacheLogger() |
| 21 | { |
| 22 | return $this->cacheLogger; |
| 23 | } |
| 24 | public function setCacheLogger(CacheLogger $logger) |
| 25 | { |
| 26 | $this->cacheLogger = $logger; |
| 27 | } |
| 28 | public function getRegionsConfiguration() |
| 29 | { |
| 30 | if ($this->regionsConfig === null) { |
| 31 | $this->regionsConfig = new RegionsConfiguration(); |
| 32 | } |
| 33 | return $this->regionsConfig; |
| 34 | } |
| 35 | public function setRegionsConfiguration(RegionsConfiguration $regionsConfig) |
| 36 | { |
| 37 | $this->regionsConfig = $regionsConfig; |
| 38 | } |
| 39 | public function getQueryValidator() |
| 40 | { |
| 41 | if ($this->queryValidator === null) { |
| 42 | $this->queryValidator = new TimestampQueryCacheValidator($this->cacheFactory->getTimestampRegion()); |
| 43 | } |
| 44 | return $this->queryValidator; |
| 45 | } |
| 46 | public function setQueryValidator(QueryCacheValidator $validator) |
| 47 | { |
| 48 | $this->queryValidator = $validator; |
| 49 | } |
| 50 | } |
| 51 |