CoolCMS API

QueryCacheKeyFactory
in package

FinalYes

Builds the full Redis key of a wire-payload query.

Format: {keyPrefix}cache:q:{ServiceFQCN}:{method}:{sha256(filters+order+limit+offset+includes)}.

The includes are part of the key because the payload depends on them. The hash comes from QueryKeyHelper::hash(), which throws on a Closure in a filter to keep the key deterministic.

Table of Contents

Properties

$config  : Config

Methods

__construct()  : mixed
build()  : string
prefix()  : string
Namespace of the whole cache subsystem under the app prefix: `app:cache:`.

Properties

Methods

build()

public build(string $serviceClass, string $method, array<string, mixed> $params, string|array<int, mixed> $includes) : string
Parameters
$serviceClass : string
$method : string
$params : array<string, mixed>

filters, order, limit, offset (and computeTotalCount)

$includes : string|array<int, mixed>

dotted relation paths

Return values
string

prefix()

Namespace of the whole cache subsystem under the app prefix: `app:cache:`.

public prefix() : string
Return values
string
On this page

Search results