mogh_cache

Crates.iomogh_cache
lib.rsmogh_cache
version1.1.1
created_at2026-01-17 21:00:51.060326+00
updated_at2026-01-23 01:07:17.148016+00
descriptionAsync caching utilities handling concurrent / parallel access
homepage
repositoryhttps://github.com/moghtech/lib
max_upload_size
id2051160
size15,515
Maxwell Becker (mbecker20)

documentation

README

Mogh Cache

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;
Commit count: 101

cargo fmt