class QueryCacheProfile (View source)

Query Cache Profile handles the data relevant for query caching.

It is a value object, setter methods return NEW instances.

Methods

__construct(integer $lifetime = 0, string|null $cacheKey = null, Cache $resultCache = null)

No description

Cache|null
getResultCacheDriver()

No description

integer
getLifetime()

No description

string
getCacheKey()

No description

array
generateCacheKeys(string $query, array $params, array $types)

Generates the real cache key from query, params and types.

setResultCacheDriver(Cache $cache)

No description

setCacheKey(string|null $cacheKey)

No description

setLifetime(integer $lifetime)

No description

Details

__construct(integer $lifetime = 0, string|null $cacheKey = null, Cache $resultCache = null)

Parameters

integer $lifetime
string|null $cacheKey
Cache $resultCache

Cache|null getResultCacheDriver()

Return Value

Cache|null

integer getLifetime()

Return Value

integer

string getCacheKey()

Return Value

string

Exceptions

CacheException

array generateCacheKeys(string $query, array $params, array $types)

Generates the real cache key from query, params and types.

Parameters

string $query
array $params
array $types

Return Value

array

QueryCacheProfile setResultCacheDriver(Cache $cache)

Parameters

Cache $cache

Return Value

QueryCacheProfile

QueryCacheProfile setCacheKey(string|null $cacheKey)

Parameters

string|null $cacheKey

Return Value

QueryCacheProfile

QueryCacheProfile setLifetime(integer $lifetime)

Parameters

integer $lifetime

Return Value

QueryCacheProfile