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
Methods
- __construct() : mixed
- build() : string
- prefix() : string
- Namespace of the whole cache subsystem under the app prefix: `app:cache:`.
Properties
$config read-only
private
Config
$config
Methods
__construct()
public
__construct(Config $config) : mixed
Parameters
- $config : Config
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
stringprefix()
Namespace of the whole cache subsystem under the app prefix: `app:cache:`.
public
prefix() : string