rag_plusplus_core/cache/
mod.rs

1//! Caching Module
2//!
3//! Provides query result caching for improved performance.
4//!
5//! # Architecture
6//!
7//! ```text
8//! ┌─────────────────────────────────────────────────────────────┐
9//! │                    QueryCache                                │
10//! ├─────────────────────────────────────────────────────────────┤
11//! │  LRU eviction policy                                         │
12//! │  TTL-based expiration                                        │
13//! │  Thread-safe access                                          │
14//! └─────────────────────────────────────────────────────────────┘
15//! ```
16//!
17//! # Cache Key
18//!
19//! Cache keys are computed from:
20//! - Query embedding (hashed)
21//! - k value
22//! - Filter expression (if any)
23//! - Index names (if specified)
24
25mod query_cache;
26
27pub use query_cache::{CacheConfig, CacheEntry, CacheKey, CacheStats, QueryCache};