This package provides an LRU string -> []byte
cache with a few nice features:
- Support for evicting the least recently used items to reduce the amount of data referenced by the cache
- Both synchronous and asynchronous eviction supported
- Setting TTL on items with lazy eviction
- Good performance
- 176 ns/insert over 10M inserts with 8 4GHz cores contending (
BenchmarkConcurrentInserts
)
- 176 ns/insert over 10M inserts with 8 4GHz cores contending (
This cache is ideal for items of roughly uniform size with a TTL.