v1.4.0-rc2
Expiration
This release add support for specifying expiration-times for values within Galaxycache via two mechanisms:
- Implement
BackendGetterWithInfo, and return a non-zero expiration time within theBackendGetInforeturn-value. - Set
WithGetTTLwhen constructing the Galaxy. - The Peeking configuration allows for setting a TTL just for peeked values, thus allowing for values to eventually expire at a time when the cache is in a steady-state.
This feature obviates much of the need for the cachekey package's jitter facilities.
Note: expirations are plumbed all the way down through the LRU, so expired values will be removed on any insertion, preventing expired values from using space that could have been used by valid values.
What's Changed
- go.mod: fix compattest/peercfg version by @dfinkel in #77
- hotcache: cap expiry before insertion by @dfinkel in #78
Full Changelog: v1.4.0-rc1...v1.4.0-rc2