Expand description
Micro Moka is a lightweight cache library for Rust. Micro Moka is a fork of Mini Moka, stripped down to the bare essentials.
Micro Moka provides an in-memory, non-thread-safe cache implementation for single thread applications.
All cache implementations perform a best-effort bounding of the map using an entry replacement algorithm to determine which entries to evict when the capacity is exceeded.
§Features
- A cache can be bounded by the maximum number of entries.
- Maintains good hit rate by using the SIEVE eviction algorithm (NSDI 2024), a lazy promotion, quick demotion algorithm with O(1) eviction.
§Examples
See the following document:
- A not thread-safe, blocking cache for single threaded applications:
§Minimum Supported Rust Versions
This crate’s minimum supported Rust versions (MSRV) are the followings:
| Feature | MSRV |
|---|---|
| default features | Rust 1.76.0 (Feb 8, 2024) |
If only the default features are enabled, MSRV will be updated conservatively. When using other features, MSRV might be updated more frequently, up to the latest stable. In both cases, increasing MSRV is not considered a semver-breaking change.
Modules§
- unsync
- Provides a not thread-safe cache implementation built upon
hashbrown::HashTable.
Structs§
- Policy
- The policy of a cache.