#cache #async

r-cache

r-cache is an in memory key value store. It is thread safe and values have expiry times

10 unstable releases (3 breaking)

0.4.1 Jun 7, 2021
0.4.0 Jan 11, 2021
0.3.4 Jan 9, 2021
0.3.0 Oct 18, 2020
0.1.0 Sep 19, 2020

#25 in Caching

Download history 65/week @ 2021-02-25 42/week @ 2021-03-04 14/week @ 2021-03-11 31/week @ 2021-03-18 58/week @ 2021-03-25 40/week @ 2021-04-01 28/week @ 2021-04-08 126/week @ 2021-04-15 843/week @ 2021-04-22 797/week @ 2021-04-29 810/week @ 2021-05-06 746/week @ 2021-05-13 465/week @ 2021-05-20 291/week @ 2021-05-27 502/week @ 2021-06-03 385/week @ 2021-06-10

1,536 downloads per month

MIT/Apache

8KB
205 lines

r-cache

A simple caching library


r-cache is an in memory key value store. It is thread safe and values can have expiry times.

Example

#[async_std::main]
async fn main() {
    let cache = Cache::new(Some(Duration::from_secs(2 * 60 * 60)));
    cache.set(KEY, VALUE, None).await;
    
    println!("{}", cache.get(KEY).await.unwrap())
}

Dependencies

~1.3–3MB
~63K SLoC