#cache #local #persistent #path #pond

pond-cache

A simple, local, persistent cache for Rust

5 unstable releases

new 0.3.0 May 16, 2024
0.2.0 May 16, 2024
0.1.3 Jun 3, 2023

#102 in Caching

Download history 1/week @ 2024-02-15 23/week @ 2024-02-22 6/week @ 2024-02-29 6/week @ 2024-03-28 1/week @ 2024-04-04

297 downloads per month

GPL-3.0-or-later

17KB
346 lines

pond

Build Action Test Action GitHub release (latest SemVer)

Rust SQLite

Simple, local, persistent cache. Backed by SQLite

Example usage

use std::path::PathBuf;
use uuid::Uuid;

use pond_cache::Cache;

fn main() {
    let cache = Cache::new(PathBuf::from("./db.sqlite")).unwrap();

    let key = Uuid::new_v4();
    let value = String::from("Hello, world!");

    cache.store(&key, value).unwrap();

    let result: Option<String> = cache.get(&key).unwrap();
}

Dependencies

~23MB
~432K SLoC