Releases: maypok86/otter
v1.2.4
v1.2.3
v1.2.2
1.2.2 - 2024-08-14
✨️Features
- Implemented
fmt.Stringer
interface forDeletionReason
type (#100)
🐞 Bug Fixes
- Fixed processing of an expired entry in the
Get
method by @hyzhangzhy (#98) - Fixed inconsistent deletion listener behavior (#98)
- Fixed the behavior of
checkedAdd
when over/underflow (#91)
Contributors
We'd like to thank all the contributors who worked on this release!
v1.2.1
v1.2.0
1.2.0 - 2024-03-12
The main innovation of this release is the addition of an Extension
, which makes it easy to add a huge number of features to otter.
Usage example:
key := 1
...
entry, ok := cache.Extension().GetEntry(key)
...
key := entry.Key()
value := entry.Value()
cost := entry.Cost()
expiration := entry.Expiration()
ttl := entry.TTL()
hasExpired := entry.HasExpired()
✨️Features
🚀 Improvements
- Added support for Go 1.22
- Memory consumption with small cache sizes is reduced to the level of other libraries (#66)
Contributors
We'd like to thank all the contributors who worked on this release!
v1.1.1
v1.1.0
1.1.0 - 2024-03-04
The main innovation of this release is node code generation. Thanks to it, the cache will no longer consume more memory due to features that it does not use. For example, if you do not need an expiration policy, then otter will not store the expiration time of each entry. It also allows otter to use more effective expiration policies.
Another expected improvement is the correction of minor synchronization problems due to the state machine. Now otter, unlike other contention-free caches in Go, should not have them at all.
✨️Features
- Added
DeleteByFunc
function to cache (#44) - Added
InitialCapacity
function to builder (#47) - Added collection of additional statistics (#57)
🚀 Improvements
v1.0.0
1.0.0 - 2024-01-26
✨️Features
- Builder pattern support
- Cleaner API compared to other caches (#40)
- Added
SetIfAbsent
andRange
functions (#27) - Statistics collection (#4)
- Cost based eviction
- Support for generics and any comparable types as keys
- Support ttl (#14)
- Excellent speed (benchmark results)
- O(1) worst case time complexity for S3-FIFO instead of O(n)
- Improved hit ratio of S3-FIFO on many traces (simulator results)