1pub mod l1;
13pub mod l2;
14pub mod manager;
15
16pub use l1::L1Cache;
17pub use l2::L2Cache;
18pub use manager::CacheManager;
19
20use thiserror::Error;
21
22#[derive(Debug, Error)]
23pub enum CacheError {
24 #[error("IO error: {0}")]
25 Io(#[from] std::io::Error),
26
27 #[error("Serialization error: {0}")]
28 Serialization(String),
29
30 #[error("Cache miss for key: {0}")]
31 CacheMiss(String),
32
33 #[error("Eviction error: {0}")]
34 Eviction(String),
35}
36
37pub type Result<T> = std::result::Result<T, CacheError>;