Skip to content

Releases: maypok86/otter

v1.2.1

15 Apr 19:54
Compare
Choose a tag to compare

1.2.1 - 2024-04-15

🐞 Bug Fixes

  • Fixed uint32 capacity overflow. (#80)

v1.2.0

12 Mar 20:02
Compare
Choose a tag to compare

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

  • Added DeletionListener to the builder (#63)
  • Added Extension (#56)

🚀 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!

@maypok86 @Aoang

v1.1.1

05 Mar 21:20
Compare
Choose a tag to compare

1.1.1 - 2024-03-06

🐞 Bug Fixes

  • Fixed alignment issues on 32-bit archs

v1.1.0

04 Mar 17:54
Compare
Choose a tag to compare

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

  • Added proactive queue-based and timer wheel-based expiration policies with O(1) time complexity (#55)
  • Added node code generation (#55)
  • Fixed the race condition when changing the order of events (#59)
  • Reduced memory consumption on small caches

v1.0.0

25 Jan 21:08
Compare
Choose a tag to compare

1.0.0 - 2024-01-26

✨️Features

  • Builder pattern support
  • Cleaner API compared to other caches (#40)
  • Added SetIfAbsent and Range 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)