Skip to content

SlotCacheableTrait

Optional trait for actions that want to customize slot caching TTL and tags.

trait SlotCacheableTrait

SourceAction/SlotCacheableTrait.php
MethodDescription
slotCacheTags(array<string, mixed> $parameters = []): array<int, string>Return an array of tag identifiers (strings) used for versioned slot cache keys.
slotCacheTtlSeconds(): ?intReturn TTL in seconds (null or <=0 for default/no explicit TTL).

public function slotCacheTags(array<string, mixed> $parameters = []): array<int, string>

Return an array of tag identifiers (strings) used for versioned slot cache keys.

ParameterTypeDescription
$parametersarray``<``string``, ``mixed``>

Returns array``<``int``, ``string``>

public function slotCacheTtlSeconds(): ?int

Return TTL in seconds (null or <=0 for default/no explicit TTL).

Returns ?``int