fibre_cache 0.4.7

Best in-class comprehensive, most flexible, high-performance, concurrent multi-mode sync/async caching library for Rust. It provides a rich, ergonomic API including a runtime-agnostic CacheLoader, an atomic `entry` API, and a wide choice of modern cache policies like W-TinyLFU, SIEVE, ARC, LRU, Clock, SLRU, Random.
Documentation
//! A high-performance, concurrent, sync/async cache designed for flexibility
//! and support for non-cloneable values.
//!
//! # Features
//! - **High Concurrency**: Built with a sharded architecture to minimize lock contention.
//! - **Sync & Async**: Provides both blocking synchronous and non-blocking `async` APIs.
//! - **Non-Clone Support**: Stores values in an `Arc<V>`, avoiding `V: Clone` bounds.
//! - **Rich Policies**: Time-to-Live (TTL), Time-to-Idle (TTI), and advanced
//!   eviction strategies like TinyLFU.
//! - **Observability**: Exposes detailed metrics for monitoring cache performance.
//! - **Persistence**: Optional `serde` feature for saving and loading cache state.

// Public modules that form the API
pub mod builder;
pub mod entry_api;
pub mod entry_api_async;
pub mod error;
pub mod handles;
pub mod listener;
pub mod metrics;
pub mod runtime;
pub mod policy;

// Internal, crate-only modules
// mod backpressure;
mod entry;
mod iter;
mod loader;
mod rng;
mod shared;
mod store;
mod sync;
mod task;
mod time;

#[cfg(feature = "serde")]
pub mod snapshot;

// Re-export the primary user-facing types for convenience
pub use builder::CacheBuilder;
pub use entry_api::Entry;
pub use entry_api_async::AsyncEntry;
pub use error::BuildError;
pub use handles::{AsyncCache, Cache};
pub use listener::{EvictionListener, EvictionReason};
pub use metrics::MetricsSnapshot;
pub use runtime::TaskSpawner;