cache/adapter-common
Common classes for PSR-6 adapters
3.0.0
26M downloads/mo
#1460 most downloaded on Packagist
php-cache/adapter-common
What this package is like to depend on
Last release 4 days ago
20 Aug 2026
Ships unpredictably
gaps range from 8 days to 4.6 years
Most releases are documented
notes for 14 of 21 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
21 releases · first in 2016
5 releases in the last 12 months
see the full history below
Release timeline
21 releases · Jan 2016 to Aug 2026Releases
latest 21-
3.0.020 Aug 2026Release notes
Open source →Added
- Add
appendListItemWithExpiration()as a protected hook for adapters that store tag lifetimes. - Expose tag generation validation to adapters with optimized bulk reads.
Changed
- Store a generation snapshot with each tagged item and reject stale snapshots after tag invalidation.
- Store tag metadata under portable, SHA-256-based
tag!andtagv!keys. Reserve those public key prefixes. - Require adapters to store tag payloads as
[tag, generation]pairs instead of tag-name maps. - Change the tag storage format. Clear shared caches before upgrading, rolling back, or running mixed versions.
Fixed
- Preserve numeric string tag names and remove each tag-index entry once.
- Validate every tag before bulk invalidation changes cache data or metadata.
- Commit deferred tagged items before invalidation scans their tag indexes.
- Add
-
2.0.319 Aug 2026Release notes
Open source →Fixed
- Treat serialized payloads that reference unavailable PHP classes as cache misses.
- Identify lazy storage failures as
getItem()operations instead of anonymous closures. - Allow installing with
psr/simple-cache2 or 3.
-
2.0.218 Aug 2026 -
2.0.118 Aug 2026Release notes
Open source →keep Symfony-style test signatures and prevent the fixer from
restoring native void declarations. -
2.0.018 Aug 2026Release notes
Open source →modernize adapters, decorators, tests, and release tooling.
BREAKING CHANGE: require PHP 8.2, psr/cache 3, and psr/simple-cache 3.
Release notes
Open source →Changed
- Require PHP 8.2 or later.
- Require
psr/cache3,psr/simple-cache3, andpsr/log3. - Add native PHP types throughout the shared item and pool implementations.
- Require tag-list mutation hooks and direct storage writers to return success status.
- Reject malformed cache payloads instead of trusting their stored shape.
Fixed
- Validate bulk keys before deleting data or tag indexes.
- Attempt every
setMultiple()write and commit accepted deferred items even when another item fails. - Report tag-index and deferred-commit failures from save, delete, and invalidation operations.
-
1.3.015 Jan 2022Release notes
Open source →- Support for PHP 8.1
- Drop support for PHP < 7.4
- Allow psr/cache: ^1.0 || ^2.0
-
1.2.014 Dec 2020 -
1.1.008 Jul 2018Release notes
Open source →Added
- Support for storing binary data
Fixed
- Issue with one character variables
Changed
- Tests are now extending
PHPUnit\Framework\TestCase
-
1.0.016 Jul 2017 -
0.4.013 Mar 2017Release notes
Open source →Added
AbstractCachePoolhas 4 new abstract methods:getList,removeList,appendListItemandremoveListItem.AbstractCachePool::invalidateTagsandAbstractCachePool::invalidateTags- Added interfaces for our items and pools
PhpCachePoolandPhpCacheItem - Trait to help adapters to support tags.
TagSupportWithArray.
Changed
- First parameter to
AbstractCachePool::storeItemInCachemust be aPhpCacheItem. - Return value from
AbstractCachePool::fetchObjectFromCachemust be a an array with 4 values. Added expiration timestamp. HasExpirationDateInterfaceis replaced byHasExpirationTimestampInterface- We do not work with
\DateTimeinternally anymore. We work with timestamps.
-
0.3.331 Jul 2016Release notes
Open source →Fixed
- Bugfix when you fetch data from the cache storage that was saved as "non-tagging item" but fetch as a tagging item.
-
0.3.224 Apr 2016 -
0.3.124 Apr 2016Nothing published for this version
-
0.3.025 Feb 2016Release notes
Open source →Changed
- The
AbstractCachePooldoes not longer implementTaggablePoolInterface. However, theCacheItemdoes still implementTaggableItemInterface. CacheItem::getKeyFromTaggedKeyhas been removed- The
CacheItem's second parameter is a callable that must return an array with 3 elements; [hasValue,value,tags].
- The
-
0.2.123 Jan 2016Nothing published for this version
-
0.2.018 Jan 2016 -
0.1.411 Jan 2016Nothing published for this version
-
0.1.311 Jan 2016Nothing published for this version
-
0.1.206 Jan 2016Nothing published for this version
-
0.1.103 Jan 2016Nothing published for this version
-
0.1.003 Jan 2016Nothing published for this version