Changelog
2.0.2
Added
ObjectCache::flush_group()now delegates to corewp_cache_flush_group()on WP 6.1+ backends that advertise support viawp_cache_supports( 'flush_group' ). The version-sentinel workaround remains the fallback for backends that don't.- Native-backend read/write paths skip the internal envelope so values are stored raw. Legacy envelopes left behind by the fallback path are unwrapped transparently on read.
Changed
- Minimum WordPress version bumped from 5.0 to 6.1.
ObjectCacherefactored: public methods reduced to thin dispatchers; native and fallback paths split into single-responsibility private helpers.
2.0.1
Fixed
- PHP 8.4 implicit-nullable deprecation on
ObjectCache::get().
2.0.0
Changed
- Refactored the library into
Contracts/Storage/Supportwith dependency injection and a full test suite. - Prefix is now required at construction time (
new Cache( 'my_plugin' )); previously a sharedduckdev_cacheprefix was hardcoded. can_cachefilter renamed to{prefix}_can_cache.
Fixed
remember()/forget()now correctly treat a cached0,'',[], orfalseas a hit instead of re-running the callback.

