class GetTaggedKeys

Get all keys associated with a tag.

Uses adaptive scanning strategy based on hash size:

  • At or below threshold: Uses HKEYS (faster, loads all into memory)
  • Above threshold: Uses HSCAN (memory-efficient streaming)

Constants

private DEFAULT_SCAN_THRESHOLD

Default threshold for switching from HKEYS to HSCAN.

Above this number of fields, use HSCAN for memory efficiency.

Methods

__construct(StoreContext $context, int $scanThreshold = self::DEFAULT_SCAN_THRESHOLD)

Create a new get tagged keys query instance.

execute(string $tag, int $count = 1000)

Execute the query.

Details

at line 30
__construct(StoreContext $context, int $scanThreshold = self::DEFAULT_SCAN_THRESHOLD)

Create a new get tagged keys query instance.

Parameters

StoreContext $context
int $scanThreshold

at line 43
Generator execute(string $tag, int $count = 1000)

Execute the query.

Parameters

string $tag

The tag name

int $count

HSCAN count parameter (items per iteration)

Return Value

Generator

Generator yielding cache keys (without prefix)