High-performance cache policies and supporting data structures.
This page maps the major modules and how they fit together.
builder — CacheBuilder and CachePolicy, the unified entrypoint for building caches.policy — Policy implementations (LRU, LFU, LRU-K, 2Q, Clock, S3-FIFO).ds — Data structures used by policies (rings, lists, heaps, arenas).stores — Storage backends for policy metadata and values.traits — Common cache traits for shared behavior and policy-specific operations.CachePolicy variant.CacheBuilder::new(capacity).build::<K, V>(policy).Cache<K, V> API for standard operations.policy::* or ds::* for advanced or policy-specific operations.Policies are gated behind feature flags (e.g. policy-lru, policy-s3-fifo). Use default-features = false and enable only the policies you need. See Compatibility and Features.