Skip to content

v3.0.0

Compare
Choose a tag to compare
@swithek swithek released this 24 Mar 00:17
· 31 commits to v3 since this release

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.