mediatekformation

Cache

Provides an API for querying/managing the second level cache regions.

Table of Contents

DEFAULT_QUERY_REGION_NAME  = 'query_cache_region'
DEFAULT_TIMESTAMP_REGION_NAME  = 'timestamp_cache_region'
MODE_GET  = 1
May read items from the cache, but will not add items.
MODE_NORMAL  = 3
May read items from the cache, and add items to the cache.
MODE_PUT  = 2
Will never read items from the cache, but will add items to the cache as it reads them from the database.
MODE_REFRESH  = 4
The query will never read items from the cache, but will refresh items to the cache as it reads them from the database.
containsCollection()  : bool
Determine whether the cache contains data for the given collection.
containsEntity()  : bool
Determine whether the cache contains data for the given entity "instance".
containsQuery()  : bool
Determine whether the cache contains data for the given query.
evictCollection()  : void
Evicts the cache data for the given identified collection instance.
evictCollectionRegion()  : void
Evicts all entity data from the given region.
evictCollectionRegions()  : void
Evict data from all collection regions.
evictEntity()  : void
Evicts the entity data for a particular entity "instance".
evictEntityRegion()  : void
Evicts all entity data from the given region.
evictEntityRegions()  : void
Evict data from all entity regions.
evictQueryRegion()  : mixed
Evicts all cached query results under the given name, or default query cache if the region name is NULL.
evictQueryRegions()  : void
Evict data from all query regions.
getCollectionCacheRegion()  : Region|null
getEntityCacheRegion()  : Region|null
getQueryCache()  : QueryCache
Get query cache by region name or create a new one if none exist.

Constants

DEFAULT_QUERY_REGION_NAME

public mixed DEFAULT_QUERY_REGION_NAME = 'query_cache_region'

DEFAULT_TIMESTAMP_REGION_NAME

public mixed DEFAULT_TIMESTAMP_REGION_NAME = 'timestamp_cache_region'

MODE_GET

May read items from the cache, but will not add items.

public mixed MODE_GET = 1

MODE_NORMAL

May read items from the cache, and add items to the cache.

public mixed MODE_NORMAL = 3

MODE_PUT

Will never read items from the cache, but will add items to the cache as it reads them from the database.

public mixed MODE_PUT = 2

MODE_REFRESH

The query will never read items from the cache, but will refresh items to the cache as it reads them from the database.

public mixed MODE_REFRESH = 4

Methods

containsCollection()

Determine whether the cache contains data for the given collection.

public containsCollection(string $className, string $association, mixed $ownerIdentifier) : bool
Parameters
$className : string

The entity class.

$association : string

The field name that represents the association.

$ownerIdentifier : mixed

The identifier of the owning entity.

Return values
bool

true if the underlying cache contains corresponding data; false otherwise.

containsEntity()

Determine whether the cache contains data for the given entity "instance".

public containsEntity(string $className, mixed $identifier) : bool
Parameters
$className : string

The entity class.

$identifier : mixed

The entity identifier

Return values
bool

true if the underlying cache contains corresponding data; false otherwise.

containsQuery()

Determine whether the cache contains data for the given query.

public containsQuery(string $regionName) : bool
Parameters
$regionName : string

The cache name given to the query.

Return values
bool

true if the underlying cache contains corresponding data; false otherwise.

evictCollection()

Evicts the cache data for the given identified collection instance.

public evictCollection(string $className, string $association, mixed $ownerIdentifier) : void
Parameters
$className : string

The entity class.

$association : string

The field name that represents the association.

$ownerIdentifier : mixed

The identifier of the owning entity.

Return values
void

evictCollectionRegion()

Evicts all entity data from the given region.

public evictCollectionRegion(string $className, string $association) : void
Parameters
$className : string

The entity class.

$association : string

The field name that represents the association.

Return values
void

evictCollectionRegions()

Evict data from all collection regions.

public evictCollectionRegions() : void
Return values
void

evictEntity()

Evicts the entity data for a particular entity "instance".

public evictEntity(string $className, mixed $identifier) : void
Parameters
$className : string

The entity class.

$identifier : mixed

The entity identifier.

Return values
void

evictEntityRegion()

Evicts all entity data from the given region.

public evictEntityRegion(string $className) : void
Parameters
$className : string

The entity metadata.

Return values
void

evictEntityRegions()

Evict data from all entity regions.

public evictEntityRegions() : void
Return values
void

evictQueryRegion()

Evicts all cached query results under the given name, or default query cache if the region name is NULL.

public evictQueryRegion([string|null $regionName = null ]) : mixed
Parameters
$regionName : string|null = null

The cache name associated to the queries being cached.

Return values
mixed

evictQueryRegions()

Evict data from all query regions.

public evictQueryRegions() : void
Return values
void

getCollectionCacheRegion()

public getCollectionCacheRegion(string $className, string $association) : Region|null
Parameters
$className : string

The entity class.

$association : string

The field name that represents the association.

Return values
Region|null

getEntityCacheRegion()

public getEntityCacheRegion(string $className) : Region|null
Parameters
$className : string

The entity class.

Return values
Region|null

getQueryCache()

Get query cache by region name or create a new one if none exist.

public getQueryCache([string|null $regionName = null ]) : QueryCache
Parameters
$regionName : string|null = null

Query cache region name, or default query cache if the region name is NULL.

Return values
QueryCache

The Query Cache associated with the region name.

Search results