A high-performance, thread-safe, memory-bound cache library for Rust, implementing Dgraph's Ristretto algorithm.
Stretto is a high-performance, thread-safe, memory-bound cache library for Rust. It implements Dgraph's Ristretto caching algorithm, providing efficient in-memory storage with optimized eviction and admission policies. It solves the problem of managing fast, concurrent access to frequently used data in Rust applications.
Rust developers building performance-sensitive applications such as web servers, databases, or real-time systems that require efficient in-memory caching.
Developers choose Stretto for its proven Ristretto algorithm, which offers excellent hit ratios and throughput, full concurrency support, and both synchronous and asynchronous APIs without the overhead of external locks.
Stretto is a Rust implementation for Dgraph's ristretto (https://github.com/dgraph-io/ristretto). A high performance memory-bound Rust cache.
Implements Dgraph's Ristretto algorithm with SampledLFU eviction and TinyLFU admission, delivering best-in-class hit ratios for search and database traces as noted in the README.
Supports internal mutability, eliminating the need for external Arc<RwLock> wrappers and allowing high-throughput concurrent access with minimal degradation.
Allows eviction decisions based on customizable cost (e.g., bytes or arbitrary units), enabling large valuable items to displace multiple smaller ones for efficient memory use.
Provides AsyncCache with a spawner parameter, making it compatible with any async runtime (e.g., Tokio) alongside a synchronous Cache API for versatility.
Requires careful tuning of parameters like num_counters (10x expected items) and max_cost, which can be error-prone and non-intuitive for newcomers.
Cache starts two extra OS threads in sync mode (policy and writing threads), adding runtime overhead that may impact lightweight applications.
Enabling real-time metrics incurs a 10% throughput performance penalty, as admitted in the README, forcing a trade-off between observability and speed.
Only stores hashed keys (via KeyBuilder) rather than the original keys, which limits direct key introspection and may complicate debugging or custom key handling.
Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids compilation when possible. Sccache has the capability to utilize caching in remote storage environments, including various cloud storage options, or alternatively, in local storage.
A high performance concurrent caching library for Rust
Rust cache structures and easy function memoization
A high-performance, concurrent, content-addressable disk cache, with support for both sync and async APIs. 💩💵 but for your 🦀
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.