CacheFactory
in
Contract for building second level cache regions components.
Tags
Table of Contents
Methods
- buildCachedCollectionPersister() : CachedCollectionPersister
- Build a collection persister for the given relation mapping.
- buildCachedEntityPersister() : CachedEntityPersister
- Build an entity persister for the given entity metadata.
- buildCollectionHydrator() : CollectionHydrator
- Build a collection hydrator
- buildEntityHydrator() : EntityHydrator
- Build an entity hydrator
- buildQueryCache() : QueryCache
- Build a query cache based on the given region name
- createCache() : Cache
- Build \Doctrine\ORM\Cache
- getRegion() : Region
- Build a cache region
- getTimestampRegion() : TimestampRegion
- Build timestamp cache region
Methods
buildCachedCollectionPersister()
Build a collection persister for the given relation mapping.
public
buildCachedCollectionPersister(EntityManagerInterface $em, CollectionPersister $persister, AssociationMapping $mapping) : CachedCollectionPersister
Parameters
- $em : EntityManagerInterface
- $persister : CollectionPersister
- $mapping : AssociationMapping
-
The association mapping.
Return values
CachedCollectionPersisterbuildCachedEntityPersister()
Build an entity persister for the given entity metadata.
public
buildCachedEntityPersister(EntityManagerInterface $em, EntityPersister $persister, ClassMetadata $metadata) : CachedEntityPersister
Parameters
- $em : EntityManagerInterface
-
The entity manager.
- $persister : EntityPersister
-
The entity persister that will be cached.
- $metadata : ClassMetadata
-
The entity metadata.
Return values
CachedEntityPersisterbuildCollectionHydrator()
Build a collection hydrator
public
buildCollectionHydrator(EntityManagerInterface $em, array<string|int, mixed> $mapping) : CollectionHydrator
Parameters
- $em : EntityManagerInterface
- $mapping : array<string|int, mixed>
-
The association mapping.
Return values
CollectionHydrator —The built collection hydrator.
buildEntityHydrator()
Build an entity hydrator
public
buildEntityHydrator(EntityManagerInterface $em, ClassMetadata $metadata) : EntityHydrator
Parameters
- $em : EntityManagerInterface
- $metadata : ClassMetadata
Return values
EntityHydrator —The built entity hydrator.
buildQueryCache()
Build a query cache based on the given region name
public
buildQueryCache(EntityManagerInterface $em[, string|null $regionName = null ]) : QueryCache
Parameters
- $em : EntityManagerInterface
- $regionName : string|null = null
-
The region name.
Return values
QueryCache —The built query cache.
createCache()
Build \Doctrine\ORM\Cache
public
createCache(EntityManagerInterface $entityManager) : Cache
Parameters
- $entityManager : EntityManagerInterface
Return values
CachegetRegion()
Build a cache region
public
getRegion(array<string, mixed> $cache) : Region
Parameters
- $cache : array<string, mixed>
-
The cache configuration.
Return values
Region —The cache region.
getTimestampRegion()
Build timestamp cache region
public
getTimestampRegion() : TimestampRegion
Return values
TimestampRegion —The timestamp region.