Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 984 Bytes

File metadata and controls

31 lines (20 loc) · 984 Bytes

Tag interfaces for PSR-6

Latest Stable Version Software License

This package defines shared interfaces for tagging PSR-6 cache items and invalidating them by tag.

Installation

composer require cache/tag-interop:^2.0

Usage

Tag-aware pools implement TaggableCacheItemPoolInterface. Their items implement TaggableCacheItemInterface.

use Cache\TagInterop\TaggableCacheItemPoolInterface;

function invalidateProducts(TaggableCacheItemPoolInterface $pool): bool
{
    return $pool->invalidateTag('products');
}

Version 2 extends the interfaces from psr/cache 3.

Contributing

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