Crates.io | amnesia |
lib.rs | amnesia |
version | 0.1.5 |
source | src |
created_at | 2023-12-14 21:41:27.363462 |
updated_at | 2023-12-15 12:06:53.692025 |
description | An expressive interface for interacting with a Cache. |
homepage | |
repository | https://github.com/m1guelpf/amnesia |
max_upload_size | |
id | 1070178 |
size | 26,637 |
An expressive Rust library for interacting with a Cache.
let mut cache = Cache::<RedisDriver>::new(RedisConfig { // or DynamoDBDriver, DatabaseDriver, MemoryDriver, etc.
redis_url: "..."
}).await?;
let my_value = cache.remember("test-value", Duration::from_secs(10), my_value).await?;
cache.forget("test-value").await?;
Please refer to the documentation on docs.rs for detailed usage instructions.
This project is licensed under the MIT License - see the LICENSE file for details.