Skip to content
This repository was archived by the owner on Nov 25, 2024. It is now read-only.

v0.11.0

Choose a tag to compare

@wafer-bw wafer-bw released this 18 Feb 04:16
· 14 commits to main since this release
34c3b67

What's Changed

  • Separate concerns, clarify construction, & simplify surface area by @wafer-bw in #9
# github.com/wafer-bw/memcache
## incompatible changes
(*Cache[K, V]).Has: removed
ErrInvalidCapacity: removed
ErrInvalidInterval: removed
Item: removed
Open: removed
WithLRUEviction: removed
## compatible changes
OpenLRUCache: added
OpenNoEvictionCache: added
WithCapacity: added

# github.com/wafer-bw/memcache/errs
## compatible changes
package added
goos: darwin
goarch: arm64
pkg: github.com/wafer-bw/memcache
BenchmarkCache_Set/100_noevict-12                               45526758                25.43 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Set/1000_noevict-12                              46742320                24.63 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Set/10000_noevict-12                             35169644                34.50 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Set/100000_noevict-12                            32131022                38.22 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Set/100_lru-12                                   15390847                70.67 ns/op           48 B/op          1 allocs/op
BenchmarkCache_Set/1000_lru-12                                  15642014                65.23 ns/op           53 B/op          1 allocs/op
BenchmarkCache_Set/10000_lru-12                                  9923109                104.8 ns/op           55 B/op          1 allocs/op
BenchmarkCache_Set/100000_lru-12                                11030911                108.5 ns/op           55 B/op          1 allocs/op
BenchmarkCache_Get/100_noevict-12                               70944522                15.95 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Get/1000_noevict-12                              72809643                15.66 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Get/10000_noevict-12                             45324636                25.56 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Get/100000_noevict-12                            35574001                31.54 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Get/100_lru-12                                   40070734                27.90 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Get/1000_lru-12                                  43711335                26.63 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Get/10000_lru-12                                 25021285                47.63 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Get/100000_lru-12                                23281192                47.71 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Get_parallel/noevict_policy_parallel-12           8548603                140.9 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Get_parallel/lru_policy_parallel-12              11336359                109.7 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Delete/100_noevict-12                            40123826                28.20 ns/op            8 B/op          1 allocs/op
BenchmarkCache_Delete/1000_noevict-12                           41316326                27.90 ns/op            8 B/op          1 allocs/op
BenchmarkCache_Delete/10000_noevict-12                          41472265                27.69 ns/op            8 B/op          1 allocs/op
BenchmarkCache_Delete/100000_noevict-12                         36415131                27.49 ns/op            8 B/op          1 allocs/op
BenchmarkCache_Delete/100_lru-12                                41471070                27.93 ns/op            8 B/op          1 allocs/op
BenchmarkCache_Delete/1000_lru-12                               40961338                27.83 ns/op            8 B/op          1 allocs/op
BenchmarkCache_Delete/10000_lru-12                              41520874                27.73 ns/op            8 B/op          1 allocs/op
BenchmarkCache_Delete/100000_lru-12                             43700277                27.47 ns/op            8 B/op          1 allocs/op
BenchmarkCache_Flush/100_noevict-12                             51373526                22.77 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Flush/1000_noevict-12                            51296755                22.79 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Flush/10000_noevict-12                           51281228                22.83 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Flush/100000_noevict-12                          50139012                22.82 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Flush/100_lru-12                                 51051972                22.93 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Flush/1000_lru-12                                51061747                22.90 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Flush/10000_lru-12                               50698065                22.92 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Flush/100000_lru-12                              50218483                22.92 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Size/100_noevict-12                              96078145                12.06 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Size/1000_noevict-12                             95830693                12.09 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Size/10000_noevict-12                            96713419                12.09 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Size/100000_noevict-12                           95310583                12.08 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Size/100_lru-12                                  96171507                12.10 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Size/1000_lru-12                                 96157698                12.10 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Size/10000_lru-12                                95503382                12.07 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Size/100000_lru-12                               95311219                12.11 ns/op            0 B/op          0 allocs/op
BenchmarkCache_Items/100_noevict-12                             45729165                25.12 ns/op           16 B/op          1 allocs/op
BenchmarkCache_Items/1000_noevict-12                            45547351                25.14 ns/op           16 B/op          1 allocs/op
BenchmarkCache_Items/10000_noevict-12                           45093921                25.16 ns/op           16 B/op          1 allocs/op
BenchmarkCache_Items/100000_noevict-12                          44250438                25.15 ns/op           16 B/op          1 allocs/op
BenchmarkCache_Items/100_lru-12                                 46400049                25.03 ns/op           16 B/op          1 allocs/op
BenchmarkCache_Items/1000_lru-12                                45611478                26.15 ns/op           16 B/op          1 allocs/op
BenchmarkCache_Items/10000_lru-12                               43173555                26.54 ns/op           16 B/op          1 allocs/op
BenchmarkCache_Items/100000_lru-12                              42977440                25.79 ns/op           16 B/op          1 allocs/op
BenchmarkCache_Keys/100_noevict-12                               1000000                 1135 ns/op          896 B/op          1 allocs/op
BenchmarkCache_Keys/1000_noevict-12                               165148                 7078 ns/op         8192 B/op          1 allocs/op
BenchmarkCache_Keys/10000_noevict-12                               14908                79468 ns/op        81921 B/op          1 allocs/op
BenchmarkCache_Keys/100000_noevict-12                                511              2313501 ns/op       802817 B/op          1 allocs/op
BenchmarkCache_Keys/100_lru-12                                   1385862                865.2 ns/op          896 B/op          1 allocs/op
BenchmarkCache_Keys/1000_lru-12                                   162832                 7175 ns/op         8192 B/op          1 allocs/op
BenchmarkCache_Keys/10000_lru-12                                   13442                88873 ns/op        81921 B/op          1 allocs/op
BenchmarkCache_Keys/100000_lru-12                                   1255               930447 ns/op       802816 B/op          1 allocs/op

Full Changelog: v0.10.1...v0.11.0