Releases: jellydator/ttlcache
v3.3.0
v3.2.1
What's Changed
- Create dependabot.yaml by @hkadakia in #128
- Add thread safety to features list by @trajan0x in #137
- Fix update of expired items by @Snawoot in #124
- Fix data race in
Items
method by @hongkuancn in #146 - Exclude expired keys in data retrieval methods by @hongkuancn in #148
New Contributors
- @hkadakia made their first contribution in #128
- @trajan0x made their first contribution in #137
- @Snawoot made their first contribution in #124
- @hongkuancn made their first contribution in #146
Full Changelog: v3.2.0...v3.2.1
v3.2.0
What's Changed
- Add Support for PreviousTTL by @ShivamKumar2002 in #121
Full Changelog: v3.1.1...v3.2.0
v3.1.1
v3.1.0
Notable changes:
- Add the
GetOrSet
andGetAndDelete
methods to theCache
type (@Savid, @DoubleDi) - Add the
Has
method to theCache
type (@gozeloglu) - Add the
Version
method to theItem
type (@gozeloglu) - Add the
Range
method to theCache
type (@gozeloglu)
v3.0.1
v2.11.1
v3.0.0
The version 3 of ttlcache includes many breaking changes, some of which improve the general usability and readability of the code, while others extend the current API with new Go features (mainly type parameters). The most notable of these additions/changes are:
- The new
Item
type that is returned by bothGet
andSet
methods. - The deletion of the
Close()
method. - The rename of the
Purge()
method toDeleteAll()
. - The rewritten
New
function that now accepts functional options. It also doesn't start the automatic expired item deletion process: theStart()
method needs to be explicitly called for it to be activated. - Improved event/callback registration methods.
- More predictable item deletion when the cache's capacity is reached.
- The new
Loader
interface.
All new or updated types and functions can be found on the documentation, README, or v3 issue page.
Generics test release.
As contributed in #66
This is a test release to change the cache into one that works with generics, allowing for a templated key value structure.
2.11.0 - GetItems method added
2.11.0 (December 2021)
#64: @DoubleDi added a method GetItems to retrieve all items in the cache. This method also triggers all callbacks associated with a normal Get
API changes:
// GetItems returns a copy of all items in the cache. Returns nil when the cache has been closed.
func (cache *Cache) GetItems() map[string]interface{} {..}