Expand description
Two-layer cache: L1Cache is an exact-match TTL LRU, L2Cache is a
per-tenant semantic cache over bge-small embeddings.
Re-exports§
pub use key::exact_key;pub use l2::L2Cache;pub use l2::SemanticStats;
Modules§
- key
- L1 exact-match cache key derivation.
- l2
- L2 semantic cache: prompts embedded with
bge-small-en-v1.5and matched per-tenant by cosine similarity against a threshold.
Structs§
- Cache
Stats - L1Cache
- Exact-match cache: a capacity-bounded LRU with per-entry TTL. A single mutex suffices because the critical section is a hash lookup plus a clone.