pub trait CacheStore: Send + Sync {
// Required methods
fn get(&self, key: &CacheKey) -> Result<Option<Value>>;
fn put(&self, key: &CacheKey, value: &Value) -> Result<()>;
fn exists(&self, key: &CacheKey) -> Result<bool>;
fn remove(&self, key: &CacheKey) -> Result<()>;
fn metadata(&self, key: &CacheKey) -> Result<Option<EntryMeta>>;
}Expand description
The K/V cache store interface.
Implementations may be in-memory, on-disk (RocksDB/sled), or remote (S3). The tiered cache composes multiple stores.