https://github.com/raisess/escale
Another ("key", "value") cache storage lib :)
https://github.com/raisess/escale
cache cache-storage cachemanager cpp11 lightweight
Last synced: 9 months ago
JSON representation
Another ("key", "value") cache storage lib :)
- Host: GitHub
- URL: https://github.com/raisess/escale
- Owner: Raisess
- License: mit
- Created: 2022-06-04T16:42:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-21T10:36:55.000Z (over 3 years ago)
- Last Synced: 2023-03-02T22:40:58.667Z (about 3 years ago)
- Topics: cache, cache-storage, cachemanager, cpp11, lightweight
- Language: C++
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESCALE
- A small lib for ("key", "value") cache.
## Usage
```cpp
#include
#include "Cache.h"
int main() {
Cache* cache = new Cache();
cache->set("Key", "Value");
std::cout << cache->get("Key") << std::endl; // Value
return 0;
}
```
- Using a single instance
```cpp
#include
#include "Cache.h"
int main() {
Cache* cache_one = Cache::SingleInstance();
cache_one->set("Key", "Value");
std::cout << cache_one->get("Key") << std::endl; // Value
Cache* cache_two = Cache::SingleInstance();
std::cout << cache_two->get("Key") << std::endl; // Value
return 0;
}
```
Keep it simple, feel free to contribute. Have a nice day! :)