interface CacheFactory (View source)

Contract for building second level cache regions components.

Methods

buildCachedEntityPersister(EntityManagerInterface $em, EntityPersister $persister, ClassMetadata $metadata)

Build an entity persister for the given entity metadata.

buildCachedCollectionPersister(EntityManagerInterface $em, CollectionPersister $persister, array $mapping)

Build a collection persister for the given relation mapping.

buildQueryCache(EntityManagerInterface $em, string $regionName = null)

Build a query cache based on the given region name

buildEntityHydrator(EntityManagerInterface $em, ClassMetadata $metadata)

Build an entity hydrator

buildCollectionHydrator(EntityManagerInterface $em, array $mapping)

Build a collection hydrator

getRegion(array $cache)

Build a cache region

getTimestampRegion()

Build timestamp cache region

createCache(EntityManagerInterface $entityManager)

Build \Doctrine\ORM\Cache

Details

CachedEntityPersister buildCachedEntityPersister(EntityManagerInterface $em, EntityPersister $persister, ClassMetadata $metadata)

Build an entity persister for the given entity metadata.

Parameters

EntityManagerInterface $em The entity manager.
EntityPersister $persister The entity persister that will be cached.
ClassMetadata $metadata The entity metadata.

Return Value

CachedEntityPersister

CachedCollectionPersister buildCachedCollectionPersister(EntityManagerInterface $em, CollectionPersister $persister, array $mapping)

Build a collection persister for the given relation mapping.

Parameters

EntityManagerInterface $em The entity manager.
CollectionPersister $persister The collection persister that will be cached.
array $mapping The association mapping.

Return Value

CachedCollectionPersister

QueryCache buildQueryCache(EntityManagerInterface $em, string $regionName = null)

Build a query cache based on the given region name

Parameters

EntityManagerInterface $em The Entity manager.
string $regionName The region name.

Return Value

QueryCache The built query cache.

EntityHydrator buildEntityHydrator(EntityManagerInterface $em, ClassMetadata $metadata)

Build an entity hydrator

Parameters

EntityManagerInterface $em The Entity manager.
ClassMetadata $metadata The entity metadata.

Return Value

EntityHydrator The built entity hydrator.

CollectionHydrator buildCollectionHydrator(EntityManagerInterface $em, array $mapping)

Build a collection hydrator

Parameters

EntityManagerInterface $em The Entity manager.
array $mapping The association mapping.

Return Value

CollectionHydrator The built collection hydrator.

Region getRegion(array $cache)

Build a cache region

Parameters

array $cache The cache configuration.

Return Value

Region The cache region.

TimestampRegion getTimestampRegion()

Build timestamp cache region

Return Value

TimestampRegion The timestamp region.

Cache createCache(EntityManagerInterface $entityManager)

Build \Doctrine\ORM\Cache

Parameters

EntityManagerInterface $entityManager

Return Value

Cache