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($lifetime = 0, $cacheKey = null, Cache|null $resultCache = null)

No description

Cache|null
getResultCacheDriver()

No description

int
getLifetime()

No description

string
getCacheKey()

No description

string[]
generateCacheKeys(string $query, mixed[] $params, int[]|string[] $types, array $connectionParams = [])

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

setResultCacheDriver(Cache $cache)

No description

setCacheKey(string|null $cacheKey)

No description

setLifetime(int $lifetime)

No description

Details

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

Parameters

$lifetime
$cacheKey
Cache|null $resultCache

Cache|null getResultCacheDriver()

Return Value

Cache|null

int getLifetime()

Return Value

int

string getCacheKey()

Return Value

string

Exceptions

CacheException

string[] generateCacheKeys(string $query, mixed[] $params, int[]|string[] $types, array $connectionParams = [])

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

Parameters

string $query
mixed[] $params
int[]|string[] $types
array $connectionParams

Return Value

string[]

QueryCacheProfile setResultCacheDriver(Cache $cache)

Parameters

Cache $cache

Return Value

QueryCacheProfile

QueryCacheProfile setCacheKey(string|null $cacheKey)

Parameters

string|null $cacheKey

Return Value

QueryCacheProfile

QueryCacheProfile setLifetime(int $lifetime)

Parameters

int $lifetime

Return Value

QueryCacheProfile