Crates.io | cask |
lib.rs | cask |
version | 0.7.1 |
source | src |
created_at | 2016-06-15 00:03:09.093691 |
updated_at | 2017-11-15 16:06:48.920591 |
description | A fast key-value store backed by a log-structured hash table |
homepage | |
repository | https://github.com/andresilva/cask |
max_upload_size | |
id | 5382 |
size | 63,726 |
A fast key-value store written in Rust. The underlying storage system is a log-structured hash table which is inspired by bitcask.
WARNING: ⚠️ Please do not trust any valuable data to this yet. ⚠️
Use the crates.io repository, add this to your Cargo.toml along with the rest of your dependencies:
[dependencies]
cask = "0.7.0"
Then, use Cask
in your crate:
extern crate cask;
use cask::{Cask, CaskOptions};
The basic usage of the library is shown below:
let cask = CaskOptions::default()
.compaction_check_frequency(1200)
.sync(SyncStrategy::Interval(5000))
.max_file_size(1024 * 1024 * 1024)
.open("cask.db")?;
let key = "hello";
let value = "world";
cask.put(key, value)?;
cask.get(key)?;
cask.delete(key)?;
cask is licensed under the MIT license. See LICENSE
for
details.