github.com/maypok86/otter@v1.2.1/CHANGELOG.md (about)

     1  ## 1.2.1 - 2024-04-15
     2  
     3  ### 🐞 Bug Fixes
     4  
     5  - Fixed uint32 capacity overflow.
     6  
     7  ## 1.2.0 - 2024-03-12
     8  
     9  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.
    10  
    11  Usage example:
    12  
    13  ```go
    14  key := 1
    15  ...
    16  entry, ok := cache.Extension().GetEntry(key)
    17  ...
    18  key := entry.Key()
    19  value := entry.Value()
    20  cost := entry.Cost()
    21  expiration := entry.Expiration()
    22  ttl := entry.TTL()
    23  hasExpired := entry.HasExpired()
    24  ```
    25  
    26  ### ✨️Features
    27  
    28  - Added `DeletionListener` to the builder ([#63](https://github.com/maypok86/otter/issues/63))
    29  - Added `Extension` ([#56](https://github.com/maypok86/otter/issues/56))
    30  
    31  ### 🚀 Improvements
    32  
    33  - Added support for Go 1.22
    34  - Memory consumption with small cache sizes is reduced to the level of other libraries ([#66](https://github.com/maypok86/otter/issues/66))
    35  
    36  ## 1.1.1 - 2024-03-06
    37  
    38  ### 🐞 Bug Fixes
    39  
    40  - Fixed alignment issues on 32-bit archs
    41  
    42  ## 1.1.0 - 2024-03-04
    43  
    44  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.
    45  
    46  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.
    47  
    48  ### ✨️Features
    49  
    50  - Added `DeleteByFunc` function to cache ([#44](https://github.com/maypok86/otter/issues/44))
    51  - Added `InitialCapacity` function to builder ([#47](https://github.com/maypok86/otter/issues/47))
    52  - Added collection of additional statistics ([#57](https://github.com/maypok86/otter/issues/57))
    53  
    54  ### 🚀 Improvements
    55  
    56  - Added proactive queue-based and timer wheel-based expiration policies with O(1) time complexity ([#55](https://github.com/maypok86/otter/issues/55))
    57  - Added node code generation ([#55](https://github.com/maypok86/otter/issues/55))
    58  - Fixed the race condition when changing the order of events ([#59](https://github.com/maypok86/otter/issues/59))
    59  - Reduced memory consumption on small caches
    60  
    61  ## 1.0.0 - 2024-01-26
    62  
    63  ### ✨️Features
    64  
    65  - Builder pattern support
    66  - Cleaner API compared to other caches ([#40](https://github.com/maypok86/otter/issues/40))
    67  - Added `SetIfAbsent` and `Range` functions ([#27](https://github.com/maypok86/otter/issues/27))
    68  - Statistics collection ([#4](https://github.com/maypok86/otter/issues/4))
    69  - Cost based eviction
    70  - Support for generics and any comparable types as keys
    71  - Support ttl ([#14](https://github.com/maypok86/otter/issues/14))
    72  - Excellent speed ([benchmark results](https://github.com/maypok86/otter?tab=readme-ov-file#-performance-))
    73  - O(1) worst case time complexity for S3-FIFO instead of O(n)
    74  - Improved hit ratio of S3-FIFO on many traces ([simulator results](https://github.com/maypok86/otter?tab=readme-ov-file#-hit-ratio-))