3.0.0
Release Notes for 3.0.0
Backwards incompatible release (major)
laminas-cache-storage-adapter-memory 3.0.0 is here and finally adds native types everywhere, adds support for psr/cache and psr/simple-cache v2 & v3, supports laminas/laminas-cache v4 and introduces an all new metadata and internal persistence logic.
The Memory adapter had its flaws by juggling with the memory_limit. There were a bunch of issues with that behavior, especially since it is impossible to calculate the exact free memory available. For more details, one can check #57. With this version, we are introducing max_items which limits the amount of items persisted to the Memory adapter (defaults to unlimited). Once the max_items are exceeding, the adapter automatically removes the oldest entries to make room for new items.
Added
- Dedicated
Metadataobject forMemory#getMetadata - Adds support for
psr/cacheandpsr/simple-cachev2 & v3 Memorynow allows passing aClockInterfacevia its constructorMemoryOptionsnow hasmax_itemsconfiguration to limit the amount of items to be cached. When the limit exceeds, the adapter automatically drops older items
Changed
- Memory adapter now supports per-item TTL and thus, the TTL is calculated
on-writerather thanon-read - Memory adapter now supports
max_itemsoption which can be used to limit the amount of items persisted to the cache
Removed
MemoryOptions#setMemoryLimit, there is no replacement. It is recommended to use themax_itemsoption insteadMemoryOptions#getMemoryLimit, there is no relacement
3.0.0
- Total issues resolved: 2
- Total pull requests resolved: 4
- Total contributors: 2
renovate
RFC
- 63: [RFC]: Serialize objects thanks to @boesing