cache0 is a lightweight, persistent Key-Value store built from scratch in C++. It is designed to demonstrate core systems programming concepts including memory management, file persistence (RAII), and the Standard Template Library (STL).
-
In-Memory Speed: Uses
std::unordered_mapfor$O(1)$ average time complexity on lookups. - Persistence: Automatically saves data to disk on exit and loads on startup (RAII pattern).
-
Safety: Utilizes
std::optionalto handle missing keys gracefully. - Modern C++: Written in C++17.
- A C++ compiler supporting C++17 (GCC, Clang, or MSVC).
Cache0/
├── include/
│ └── cache0.hpp # The Product (Header-Only Library)
├── src/
│ └── main.cpp # The Example/Demo file
├── tests/
│ └──test_cache0.cpp # Unit Tests
├── .gitignore # The ignore file
├── .github/ # The CI workflow
└── README.md # Readme File
This project is licensed under the MIT License - see the LICENSE file for details.