Skip to content

tstarling/thread-safe-lru

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thread-safe LRU Cache

A set of header-only C++ classes providing thread-safe LRU caches. Uses Intel's tbb::concurrent_hash_map.

  • ThreadSafeLRUCache is a single tbb::concurrent_hash_map with attached LRU list.
  • ThreadSafeScalableCache is a cache object built from a collection of ThreadSafeLRUCache objects, with items distributed by key hash. This allows it to serve a high rate of evictions/inserts without significant lock contention.
  • ThreadSafeStringKey is a reference-counting string object with a memoized hash value. This is recommended as a key object for the above two containers.

For indicative benchmarks to help with container selection, see the benchmarks page on the wiki.

About

A C++ template class providing a thread-safe LRU cache

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published