class Flush

Flush tags using lazy cleanup mode (fast).

Skips reading reverse index and cross-tag cleanup. Orphaned hash fields are left for the scheduled cleanup command to remove later.

Process:

  1. Collect all unique keys from all tags
  2. Delete the cache keys and reverse index sets
  3. Delete the tag hashes themselves

Performance: 5-10x faster than eager mode for large tag sets. Memory impact: Orphaned fields until cleanup runs (~50MB max with hourly cleanup)

Constants

private CHUNK_SIZE

Methods

__construct(StoreContext $context, GetTaggedKeys $getTaggedKeys)

Create a new flush operation instance.

bool
execute(array $tags)

Execute the lazy flush.

Details

at line 31
__construct(StoreContext $context, GetTaggedKeys $getTaggedKeys)

Create a new flush operation instance.

Parameters

StoreContext $context
GetTaggedKeys $getTaggedKeys

at line 43
bool execute(array $tags)

Execute the lazy flush.

Parameters

array $tags

Array of tag names to flush

Return Value

bool

True if successful, false on failure