nowfound

Life & fun · August 30, 2016

A header only C++11 LRU Cache template class, with no dependencies

A header only C++11 LRU Cache template class that allows you to define key, value and optionally the Map type. uses a double linked list and a std::unordered_map style container to provide fast insert, delete and update No dependencies other than the C++ standard library. This is a C++11 remake of m

A header only C++11 LRU Cache template class, with no dependencies launched on August 30, 2016 with 29 votes, #1,675 of 3,856 launches that month and more than 75% of that year's launches. The site was still online in September 2026, 10 years on.

In plain words

A lightweight C++11 template class that implements an LRU (Least Recently Used) cache with no external dependencies. It provides a header-only implementation, meaning developers can simply include it in their projects without additional compilation steps. The cache automatically removes the least recently accessed items when capacity is reached. It's designed for C++ developers who need efficient caching functionality without adding library dependencies to their projects.

written from the facts on this page · September 2026

From the sources

A header only C++11 LRU Cache template class that allows you to define key, value and optionally the Map type. uses a double linked list and a std::unordered_map style container to provide fast insert, delete and update No dependencies other than the C++ standard library. This is a C++11 remake of my earlier LRUCache project (https://github.com/mohaps/lrucache) The goal was to create a fast LRUCac

Does a similar job

all alternatives →
  • Integer Map Data Structure2024 · github.com · ▲91

    This project presents a new data structure for storing ordered integer maps. The proposed data structure is a compressive, cache-friendly, radix tree that has performance comparable to an unordered map (`std::unordered_map`) and is an order of magnitude faster than an ordered map (`std::map`).

  • Compile-time HTML parsing in C++142017 · github.com · ▲175

    A C++ HTML template engine that uses compile time HTML parsing - rep-movsd/see-phit

  • A LRU cache using go generics2022 · github.com · ▲57

    LRU cache using go generics. Contribute to dboslee/lru development by creating an account on GitHub.

  • I built a small browser engine from scratch in C++Jan 2026 · github.com · ▲146

    Hi HN! Korean high school senior here, about to start CS in college. I built a browser engine from scratch in C++ to understand how browsers work. First time using C++, 8 weeks of development, lots of debugging—but it works! Features: - HTML parsing with error correction - CSS cascade and inheritance - Block/inline layout engine - Async image loading + caching - Link navigation + history Hardest parts: - String parsing(html, css) - Rendering - Image Caching & Layout Reflowing What I learned (beyond code): - Systematic debugging is crucial - Ship with known bugs rather than chase…

  • Single-header C++11 HTML document constructor2018 · github.com · ▲87

    A C++ HTML document constructor only depending on the standard library. - tinfoilboy/CTML

  • A hash array-mapped trie implementation in C2023 · github.com · ▲171

    Long-simmering side project that is finally ready to see the light. HAMTs are a cool persistent data structure and implementing one has been a lot of fun. Beyond the code, there is likely some value in the extensive and largely complete implementation docs; basic benchmarks are linked in the README, too. Kind of aiming to be "the libavl for HAMTs". That is obviously a high and aspirational bar but a distinct possibility if it stirs up a little interest and/or contribution. Anyways, it's time for this to go out, collect feedback and maybe even some use outside of toy projects. Let me…

More life & fun this month

the category →

Source: Show HN post ↗

Launched alongside, August 2016

the whole month →