moka-rs/moka
A high performance concurrent caching library for Rust observed · 2026-08-28
Health v2 · maintenance only
93/100
- Activity 96
- Release rhythm 84
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 34.5
- age_days: 2341
- days_rel: 24
- days_push: 24
- n_releases_24m: 5
Adoption not part of the score
2670 stars · 126 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Moka is a fast, concurrent in-memory caching library for Rust, inspired by Java's Caffeine. It provides thread-safe synchronous and async caches with size bounding, TinyLFU admission/LRU eviction, TTL/TTI expiration, and eviction listeners.
Use cases
- cache expensive computation results in a Rust application
- add an in-memory cache with TTL expiration to my API server
- bound a shared hashmap by entry count or weighted size
- share a thread-safe cache across OS threads
- use an async-aware cache in a Tokio service
- improve cache hit ratio with LFU-based admission
- run callbacks when cache entries are evicted
When to choose
- you need a high-performance concurrent cache in Rust with near-optimal hit ratios
- you want Caffeine-like eviction policies (TinyLFU admission, LRU eviction) in Rust
- you need both sync and async cache APIs with TTL, TTI, and per-entry expiration
- you need size-aware eviction or eviction listener callbacks
When to avoid
- you need a distributed or shared cache across processes or machines (use Redis or similar)
- you need persistent or on-disk caching
- you are not working in Rust
Facets
library · maturity stable
caching developer-tools performance backend rust cross-platform in-memory-cache concurrent caffeine-inspired lfu lru ttl async
2 sources
- readme: https://github.com/moka-rs/moka · fetched 2026-08-28 · 5dbde351d222
- registry_crates: https://crates.io/api/v1/crates/moka · fetched 2026-08-29 · 6622426cf602
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| moka-rs/moka | main | 93 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem