Skip to content
Simple and reliable LRU cache for c++ based on hashmap and linkedlist
C++ CMake
Branch: master
Clone or download
lamerman Merge pull request #20 from kainjow/patch-1
Fix wrong namespace name in comment
Latest commit de1c4a0 May 23, 2017


Simple and reliable LRU (Least Recently Used) cache for c++ based on hashmap and linkedlist. The library is header only, simple test and example are included. It includes standard components and very little own logics that guarantees reliability.


/**Creates cache with maximum size of three. When the 
   size in achieved every next element will replace the 
   least recently used one */
cache::lru_cache<std::string, std::string> cache(3);

cache.put("one", "one");
cache.put("two", "two");

const std::string& from_cache = cache.get("two")

How to run tests:

mkdir build
cd build
cmake ..
make check
You can’t perform that action at this time.