cache/hierarchical-cache

A helper trait and interface to your PSR-6 cache to support hierarchical keys.

Maintainers

Package info

github.com/php-cache/hierarchical-cache

Homepage

pkg:composer/cache/hierarchical-cache

Transparency log

Statistics

Installs: 16 898 414

Dependents: 9

Suggesters: 0

Stars: 60

2.1.0 2026-08-20 01:59 UTC

This package is auto-updated.

Last update: 2026-08-20 02:25:30 UTC


README

Latest Stable Version Coverage Software License

This package defines hierarchical PSR-6 pools. A hierarchical pool can invalidate a branch without enumerating every child key.

For example, deleting |users|42|followers also invalidates keys below that path.

Installation

composer require cache/hierarchical-cache:^2.1

Usage

Read the hierarchical cache guide for key syntax and invalidation behavior.

Implementing a pool

Adapter authors can use HierarchicalCachePoolTrait. Read the implementation guide before storing or deleting hierarchical keys.

Version 2.1 supports cache/adapter-common 2 and 3. Use it with the Common version required by the concrete adapter.

Contributing

Send pull requests to the main repository. Report issues on the GitHub issue tracker.