Registry / utility / moka
library0.12.15rscratesunverified

A fast and concurrent cache library inspired by Java Caffeine.

# Cargo.toml [dependencies] moka = "0.12.15"
INSTALL
IMPORT
SIG · MOKA
M
moka
utilityrustv0.12.15
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Cache
use moka::sync::Cache;

Create a concurrent cache with bounded size and eviction policies.

use moka::sync::Cache; let cache: Cache<String, u32> = Cache::new(100); cache.insert("key".to_string(), 42); if let Some(v) = cache.get("key") { println!("Value: {}", v); }
Debug
Known issues
gotchaRequires the 'sync' or 'future' feature for thread-safe or async usage.
fix
Add `features = ["sync"]` or `features = ["future"]` to Cargo.toml dependency.
affects: >=0.1.0
Upgrade
Version history
0.12.15latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
moka — cargo add moka · libregistry