Skip to content

schmatz/memory-capped-lru-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memory Capped LRU Cache

CircleCI

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)

This cache is ideal for items of roughly uniform size with a TTL.

About

A simple memory-capped LRU cache

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages