cpp-lru-cache icon indicating copy to clipboard operation
cpp-lru-cache copied to clipboard

Simple and reliable LRU cache for c++ based on hashmap and linkedlist

Results 11 cpp-lru-cache issues
Sort by recently updated
recently updated
newest added

`_cache_items_map.erase(it);` Is the line of code redundent?

I was wondering that lrucache should only declare function in header files and implement the declration in .cpp files such as lrucache.cpp

We all know that hashmaps are cool, but It'd be interesting to see how exactly cool they are. I suggest writing a comparison with getting values from plain std::map and...

Hi, While performing some benchmarks I noticed that inserted values are copied, which reduces insert performance. I'll create a pull request to move values into the cache.

Need to iterate all keys of storage for example if I want to display/save to file all visited file paths stored in lru. Why just not return _cache_items_list.cbegin() and _cache_items_list.cend()?

Thanks for the simple and efficient implementation! Here is my solution based on your work. ```cpp #pragma once #ifndef LEVIDB_LRU_CACHE_H #define LEVIDB_LRU_CACHE_H /* * Original File: lrucache.hpp * Original Author:...

Steps to reproduce: ``` $ mkdir build $ cd build $ cmake -G Ninja .. [...] $ ninja ninja: error: 'ext/gtest/src/googletest-build/libgtest.a', needed by 'cpp-lru-cache-test', missing and no known rule to...

After a quick test using valgrind I'm experiencing invalid reads on a multithreaded application. Is this a bug or is your library only expected to work in a single-threaded environment?