Update module ReneKroon/ttlcache to v2
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
2.1.0 (October 2020)
API changes
-
SetCacheSizeLimit(limit int)
a call was contributed to set a cache limit. #35
v2.0.0
2.0.0 (July 2020)
#29, #30, #31
FixesBehavioural 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 errorsErrClosed
anErrNotFound
instead of a bool or nothing -
SkipTTLExtensionOnHit
replacesSkipTtlExtensionOnHit
to satisfy golint - The callback types are now exported
v1.7.0
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 oncache.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
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.