DefaultQueryCache
in package
implements
QueryCache
Default query cache implementation.
Tags
Table of Contents
Interfaces
- QueryCache
- Defines the contract for caches capable of storing query results.
Properties
- $cacheLogger : CacheLogger|null
- $em : EntityManagerInterface
- $hints : array<string, mixed>
- $region : Region
- $uow : UnitOfWork
- $validator : QueryCacheValidator
Methods
- __construct() : mixed
- clear() : bool
- get() : array<string|int, mixed>|null
- getRegion() : Region
- put() : bool
- getAssociationPathValue() : array<string|int, mixed>|object|null
- getAssociationValue() : array<string|int, mixed>|object|null
- storeAssociationCache() : array<string|int, mixed>|null
Properties
$cacheLogger
protected
CacheLogger|null
$cacheLogger
$em
private
EntityManagerInterface
$em
$hints
private
static array<string, mixed>
$hints
= [\Doctrine\ORM\Query::HINT_CACHE_ENABLED => true]
$region
private
Region
$region
$uow
private
UnitOfWork
$uow
$validator
private
QueryCacheValidator
$validator
Methods
__construct()
public
__construct(EntityManagerInterface $em, Region $region) : mixed
Parameters
- $em : EntityManagerInterface
-
The entity manager.
- $region : Region
-
The query region.
clear()
public
clear() : bool
Return values
boolget()
public
get(QueryCacheKey $key, ResultSetMapping $rsm[, array<string|int, mixed> $hints = [] ]) : array<string|int, mixed>|null
Parameters
- $key : QueryCacheKey
- $rsm : ResultSetMapping
- $hints : array<string|int, mixed> = []
Return values
array<string|int, mixed>|nullgetRegion()
public
getRegion() : Region
Return values
Regionput()
public
put(QueryCacheKey $key, ResultSetMapping $rsm, mixed $result[, array<string|int, mixed> $hints = [] ]) : bool
Parameters
- $key : QueryCacheKey
- $rsm : ResultSetMapping
- $result : mixed
- $hints : array<string|int, mixed> = []
Return values
boolgetAssociationPathValue()
private
getAssociationPathValue(mixed $value, array<string|int, mixed> $path) : array<string|int, mixed>|object|null
Parameters
- $value : mixed
- $path : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>|object|nullgetAssociationValue()
private
getAssociationValue(ResultSetMapping $rsm, string $assocAlias, object $entity) : array<string|int, mixed>|object|null
Parameters
- $rsm : ResultSetMapping
- $assocAlias : string
- $entity : object
Tags
Return values
array<string|int, mixed>|object|nullstoreAssociationCache()
private
storeAssociationCache(QueryCacheKey $key, AssociationMapping $assoc, mixed $assocValue) : array<string|int, mixed>|null
Parameters
- $key : QueryCacheKey
- $assoc : AssociationMapping
- $assocValue : mixed