| Crates.io | mogh_cache |
| lib.rs | mogh_cache |
| version | 1.1.1 |
| created_at | 2026-01-17 21:00:51.060326+00 |
| updated_at | 2026-01-23 01:07:17.148016+00 |
| description | Async caching utilities handling concurrent / parallel access |
| homepage | |
| repository | https://github.com/moghtech/lib |
| max_upload_size | |
| id | 2051160 |
| size | 15,515 |
use std::sync::OnceLock;
use mogh_cache::CloneCache;
type Cache = CloneCache<i64, i64>;
pub fn cache() -> &'static Cache {
static CACHE: OnceLock<Cache> = OnceLock::new();
CACHE.get_or_init(Default::default)
}
let entry: Option<i64> = cache().get(&0).await;