-
Notifications
You must be signed in to change notification settings - Fork 0
Add README.md with project description, features, and directory structure #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,33 @@ | ||||||||||||||||||||||||||||||||||||||||||||
| # cache0 | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| **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). | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| ## Features | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| - **In-Memory Speed:** Uses `std::unordered_map` for $O(1)$ average time complexity on lookups. | ||||||||||||||||||||||||||||||||||||||||||||
| - **Persistence:** Automatically saves data to disk on exit and loads on startup (RAII pattern). | ||||||||||||||||||||||||||||||||||||||||||||
| - **Safety:** Utilizes `std::optional` to handle missing keys gracefully. | ||||||||||||||||||||||||||||||||||||||||||||
| - **Modern C++:** Written in C++17. | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| ## Getting Started | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| ### Prerequisites | ||||||||||||||||||||||||||||||||||||||||||||
| - A C++ compiler supporting C++17 (GCC, Clang, or MSVC). | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| ### Directory Structure | ||||||||||||||||||||||||||||||||||||||||||||
| ```text | ||||||||||||||||||||||||||||||||||||||||||||
| Cache0/ | ||||||||||||||||||||||||||||||||||||||||||||
| ├── include/ | ||||||||||||||||||||||||||||||||||||||||||||
| │ └── cache0.hpp # The Product (Header-Only Library) | ||||||||||||||||||||||||||||||||||||||||||||
| ├── src/ | ||||||||||||||||||||||||||||||||||||||||||||
| │ └── main.cpp # The Example/Demo file | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+25
to
+27
|
||||||||||||||||||||||||||||||||||||||||||||
| │ └── cache0.hpp # The Product (Header-Only Library) | |
| ├── src/ | |
| │ └── main.cpp # The Example/Demo file | |
| │ └── cache0.hpp # Public header for the cache0 library | |
| ├── src/ | |
| │ ├── cache0.cpp # Library implementation | |
| │ └── main.cpp # Example/Demo file |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the directory tree, └──test_cache0.cpp is missing a space after the branch symbol, which makes the formatting inconsistent with the other entries.
| │ └──test_cache0.cpp # Unit Tests | |
| │ └── test_cache0.cpp # Unit Tests |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The listed directory structure does not match the current repo layout (e.g., the repo has test/ not tests/, and there is a src/cache0.cpp implementation file that is not shown). Please update the tree to reflect the actual top-level folders/files to avoid onboarding confusion.
| 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 | |
| cache0/ | |
| ├── include/ | |
| │ └── cache0.hpp # Public header | |
| ├── src/ | |
| │ ├── cache0.cpp # Implementation file | |
| │ └── main.cpp # Example/Demo executable | |
| ├── test/ | |
| │ └── test_cache0.cpp # Unit tests | |
| ├── .gitignore # Git ignore rules | |
| ├── .github/ # CI workflows | |
| └── README.md # Project documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README advertises an MIT license badge, but there is no LICENSE (or similar) file in the repository. This is misleading for users and automated tooling. Add the appropriate license file or update/remove the badge to match the actual licensing.