Prune
class Prune
Prune orphaned fields from any tag hashes.
This operation performs a complete cleanup of any-mode tag data:
- Removes expired tags from the registry (ZREMRANGEBYSCORE)
- Gets active tags from the registry (ZRANGE)
- Scans each tag hash for orphaned fields (HSCAN + EXISTS checks)
- Removes orphaned fields where the cache key no longer exists (HDEL)
- Deletes empty hashes (HLEN == 0)
This cleanup is needed because in lazy flush mode, when cache keys are deleted directly (not via tag flush), the hash field references remain.
Constants
| private DEFAULT_SCAN_COUNT |
Default number of hash fields to process per HSCAN iteration. |
Methods
array
execute(int $scanCount = self::DEFAULT_SCAN_COUNT)
Execute the prune operation.
Details
at line 37
__construct(StoreContext $context)
Create a new prune operation instance.
at line 48
array
execute(int $scanCount = self::DEFAULT_SCAN_COUNT)
Execute the prune operation.