Skip to content

Update module ReneKroon/ttlcache to v2

msvechla requested to merge renovate/github.com-renekroon-ttlcache-2.x into master

This MR contains the following updates:

Package Type Update Change
github.com/ReneKroon/ttlcache require major v1.6.0 -> v2.1.0

Release Notes

ReneKroon/ttlcache

v2.1.0

Compare Source

2.1.0 (October 2020)

API changes

  • SetCacheSizeLimit(limit int) a call was contributed to set a cache limit. #​35

v2.0.0

Compare Source

2.0.0 (July 2020)

Fixes #​29, #​30, #​31

Behavioural changes

  • Remove(key) now also calls the expiration callback when it's set
  • Count() returns zero when the cache is closed

API changes

  • SetLoaderFunction allows you to provide a function to retrieve data on missing cache keys.
  • Operations that affect item behaviour such as Close, Set, SetWithTTL, Get, Remove, Purge now return an error with standard errors ErrClosed an ErrNotFound instead of a bool or nothing
  • SkipTTLExtensionOnHit replaces SkipTtlExtensionOnHit to satisfy golint
  • The callback types are now exported

v1.7.0

Compare Source

This release has two points:

  • Remove vendoring and continue with modules only. I consider this not breaking as this is a possibility since Go 1.11 and is not an issue on the current Go 1.13 and 1.14 build.
  • Fixed issue #​28: call expirationCallback automatically on cache.Close()

Note that while all expirationCallback routines are called for all items in the cache on cache.Close() there is no synchronized wait. This is the current behavior for expiration at runtime. It's up to the cache creator to decide whether to built in synchronization for a full clean shutdown. See TestCache_ExpirationOnClose(t *testing.T) for a sample with synchronization.


Renovate configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Merge request reports