cache/hierarchical-cache
PSR-6 cache pool with hierarchical keys and selective flushing. Organize cache entries like |users|:uid|followers| and invalidate whole branches (e.g., all followers) without clearing everything. Part of the PHP Cache organization.
Architecture fit: The package acts as a PSR-6 decorator that adds hierarchical flushing capabilities to any existing PSR-6 cache pool (e.g., Symfony Cache, FileCache). It fits cleanly as a thin layer atop standard cache implementations without altering core architecture.
Integration feasibility: High for PSR-6-compatible systems. Requires wrapping an existing pool (e.g., new HierarchicalCachePool($yourPool)), but Laravel’s cache system requires custom driver implementation to inject this decorator.
Technical risk: High. Last updated in 2022 with 0 dependents; no active maintenance. Hardcoded | delimiter (non-configurable), clear() scans all items (not efficient for large caches), and lacks Redis-specific optimizations by default.
Key questions: How does it handle Redis backend performance? Does Laravel’s cache manager fully support PSR-6 pools without breaking existing functionality? What failure modes occur if the underlying pool doesn’t implement getItems() reliably?
Stack fit: Works with PSR-6 pools (e.g., Symfony Cache, FileCache) but not PSR-16. Requires Laravel to use a PSR-6-compliant cache driver (
How can I help you explore Laravel packages today?