Crates.io | sparkv |
lib.rs | sparkv |
version | 0.1.1 |
source | src |
created_at | 2024-05-07 08:02:48.514279 |
updated_at | 2024-05-07 10:06:02.156543 |
description | Expirable in-memory key-value store |
homepage | https://crates.io/crates/sparkv |
repository | https://github.com/uzyn/sparkv |
max_upload_size | |
id | 1231943 |
size | 20,724 |
SparKV is an expirable in-memory key-value store for Rust.
Add SparKV crate to your Cargo dependencies:
$ cargo add sparkv
Quick start
use sparkv::SparKV;
let mut sparkv = SparKV::new();
sparkv.set("your-key", "your-value"); // write
sparkv.get("your-key", "your-value"); // read
// Set with unique TTL
sparkv.set_with_ttl("longer", "your-value", std::time::Duration::from_secs(60));
See config.rs
for more configuration options.
MIT License
Copyright © 2024 U-Zyn Chua