r_cache/lib.rs
1//! ## r-cache
2//!
3//! r-cache is an in memory key value store. It is thread safe and values can have expiry times.
4//!
5//! # Example
6//! ```
7//! use r_cache::cache::Cache;
8//! use std::time::Duration;
9//!
10//! const KEY: i8 = 0;
11//! const VALUE: &str = "VALUE";
12//!
13//! # #[async_std::main]
14//! # async fn main() {
15//! let cache = Cache::new(Some(Duration::from_secs(2 * 60 * 60)));
16//! cache.set(KEY, VALUE, None);
17//!
18//! println!("{}", cache.get(&KEY).unwrap())
19//! }
20//! ```
21
22mod item;
23
24pub mod cache;