Skip to content

Releases: jellydator/ttlcache

v3.2.0

19 Feb 11:40
9766960
Compare
Choose a tag to compare

What's Changed

Full Changelog: v3.1.1...v3.2.0

v3.1.1

14 Dec 14:02
a91502b
Compare
Choose a tag to compare

Fix a bug in the Range method that causes a panic when the cache is empty

v3.1.0

22 Aug 20:07
Compare
Choose a tag to compare

Notable changes:

  • Add the GetOrSet and GetAndDelete methods to the Cache type (@Savid, @DoubleDi)
  • Add the Has method to the Cache type (@gozeloglu)
  • Add the Version method to the Item type (@gozeloglu)
  • Add the Range method to the Cache type (@gozeloglu)

v3.0.1

31 Dec 17:53
43fd47e
Compare
Choose a tag to compare

Add a SupressedLoader initialization function (#86)

v2.11.1

24 Mar 00:11
Compare
Choose a tag to compare

The v2 module path has been changed.

v3.0.0

24 Mar 00:17
Compare
Choose a tag to compare

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 both Get and Set methods.
  • The deletion of the Close() method.
  • The rename of the Purge() method to DeleteAll().
  • The rewritten New function that now accepts functional options. It also doesn't start the automatic expired item deletion process: the Start() 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.

18 Dec 19:48
Compare
Choose a tag to compare
Pre-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

18 Dec 19:39
Compare
Choose a tag to compare

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{} {..}

2.10.0 - memory leak fix

06 Dec 17:07
de26703
Compare
Choose a tag to compare

2.10.0 (December 2021)

#62 : @nikhilk1701 found a memory leak where removed items are not directly eligible for garbage collection. There are no API changes.

v2.9.0 - Great performance improvements

17 Oct 19:05
Compare
Choose a tag to compare

2.9.0 (October 2021)

#55,#56,#57 : @chenyahui was on fire and greatly improved the peformance of the library. He also got rid of the blocking call to expirationNotification, making the code run twice as fast in the benchmarks!