Changelog History
Page 2
-
v2.2.0 Changes
January 01, 2021API changes:
- #37 : a GetMetrics call is now available for some information on hits/misses etc.
- #34 : Errors are now const
-
v2.1.0 Changes
October 01, 20202.1.0 (October 2020)
API changes
SetCacheSizeLimit(limit int)
a call was contributed to set a cache limit. #35
-
v2.0.0 Changes
July 01, 20202.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 errorsErrClosed
anErrNotFound
instead of a bool or nothing - ๐
SkipTTLExtensionOnHit
replacesSkipTtlExtensionOnHit
to satisfy golint - The callback types are now exported
- ๐
-
v1.7.0 Changes
July 22, 2020๐ 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 oncache.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. -
v1.6.0 Changes
October 15, 2019In issue #23 it became clear that people want create and drop caches on the fly. There was a goroutine leak in that case.
- ๐ The goroutine leak is fixed, after calling
Close
, an empty cache remains. - โ Tests are now done with uber goroutine leak detector.
- โ Test logging has been cleaned.
- ๐ 100% coverage, not by synthetic testing but by building up the test suite with seen issues over time.
- ๐ The goroutine leak is fixed, after calling
-
v1.5.0 Changes
June 17, 2019๐ Depending on your usage, the issues fixed may improve stability of your programs:
๐ง #20 : A crash was observed by me in a configuration that was not in the test suite. This subsequently triggered some rework on the locking.
-
v1.4.0 Changes
April 29, 2019๐ Depending on your usage, the issues fixed may improve stability of your programs:
๐ #17 : Fixes a data race on read and introduces RWLock which is better for performance on heavy workloads.
โฌ๏ธ #18 : Addresses excessive memory usage if you have a long running timer as global TTL. if pprof shows most of your memory in use coming from ttlcache then you must upgrade:[...] ----------------------------------------------------------+------------- flat flat% sum% cum cum% calls calls% + context ----------------------------------------------------------+------------- 1034.31MB 100% | github.com/ReneKroon/ttlcache.(*Cache).startExpirationProcessing 983.58MB 82.74% 82.74% 1034.31MB 87.00% | time.NewTimer 50.73MB 4.90% | time.startTimer ----------------------------------------------------------+-------------
-
v1.3.0 Changes
March 27, 2019๐ Fixes issue #15 - checkExpireCallback doesn't work when skipTtlExtension is enabled.
-
v1.2.0 Changes
September 08, 2018โก๏ธ This fixes issue #12 and updates the Travis CI to current go versions.
SkipTtlExtensionOnHit allows the user to change the cache behaviour. When this flag is set to true it will
no longer extend TTL of items when they are retrieved using Get, or when their expiration condition is evaluated using SetCheckExpirationCallback. -
v1.1.1 Changes
September 08, 2018๐ This fixes issue #14, which can occur when using SetCheckExpirationCallback and it returns false on the last element in the list.