Skip to main content

rusty_ssr/cache/
mod.rs

1//! Multi-tier caching system optimized for CPU cache efficiency
2//!
3//! ## Architecture
4//!
5//! ```text
6//! Request ──► Hot Cache (L1/L2 CPU) ──► Cold Cache (RAM) ──► Miss
7//!              │ ~1-3ns latency        │ ~100ns latency
8//!              │ 8 entries/thread      │ N entries shared
9//!              └───────────────────────┘
10//! ```
11//!
12//! - **Hot Cache**: Thread-local, fits in L1/L2 CPU cache (~4KB per thread)
13//! - **Cold Cache**: Shared RAM cache with DashMap for lock-free access
14//! - **Auto-promotion**: Cold hits are promoted to hot cache
15
16mod cold;
17pub mod hot;  // Public for benchmarking
18mod padded;
19mod ssr;
20mod utils;
21
22pub use ssr::{SsrCache, CacheMetrics};
23pub use hot::HotCache;