Expand description
Cache Library
A caching library that provides a simple Cache trait with multiple eviction strategies.
It is designed to be injected and configured during the policy
configuration phase and supports both policy-isolated and shared caches across policies.
This library provides data storage functionality with support for:
- FIFO eviction strategy (First-In-First-Out)
- LRU eviction strategy (Least Recently Used)
- Builder pattern via
builder::CacheBuilderandbuilder::CacheBuilderInstance - Policy-isolated caches by default; opt-in shared caches via
builder::CacheBuilderInstance::shared() - Configurable maximum entries per cache
Re-exports§
pub use builder::EvictionStrategy;pub use builder::LruStrategy;
Modules§
- builder
- Primitives for building a cache
- error
- Possible errors encountered during the usage of a
crate::Cache
Traits§
- Cache
- Represents a cache. It stores each element as a new entry.