| Crates.io | caches |
| lib.rs | caches |
| version | 0.3.0 |
| created_at | 2021-09-20 07:21:26.637897+00 |
| updated_at | 2025-01-10 17:29:40.419156+00 |
| description | This is a Rust implementation for popular caches (support no_std). |
| homepage | https://github.com/al8n/caches-rs |
| repository | https://github.com/al8n/caches-rs.git |
| max_upload_size | |
| id | 453855 |
| size | 454,122 |
This is a Rust implementation for popular caches (support no_std).
See Introduction, Installation and Usages for more details.
English | 简体中文
The MSRV for this crate is 1.55.0.
LRUCache, SegmentedCache, TwoQueueCache and AdaptiveCache.TinyLFU, SampledLFU, and WTinyLFUCachestd
[dependencies]
caches = "0.3"
no_std
[dependencies]
caches = { version = "0.3", default-features = false, features = ["libm", "hashbrown"] }
Please see examples.
If you want a high-performance thread-safe modern cache, please see https://crates.io/crates/stretto
The implementation of RawLRU is highly inspired by
Jerome Froelich's LRU implementation
and std::collections library of Rust.
Thanks for HashiCorp's golang-lru providing the amazing Go implementation.
Ramakrishna's paper: Caching strategies to improve disk system performance
The implementation of TinyLFU and SampledLFU are inspired by Dgraph's ristretto and dgryski's go-tinylfu.
Gil Einziger's paper: TinyLFU: A Highly Efficient Cache Admission Policy