pub trait InvestigationReportCache: Send + Sync {
// Required methods
fn get(&self, key: &str) -> Option<InvestigationReport>;
fn put(&self, key: String, report: InvestigationReport);
fn invalidate(&self, key: &str);
fn clear(&self);
}Expand description
Cache abstraction for normalized investigation reports.
Implementations are expected to store cloned InvestigationReport values keyed by the
hashed HAR payload and target class.
Required Methods§
Sourcefn get(&self, key: &str) -> Option<InvestigationReport>
fn get(&self, key: &str) -> Option<InvestigationReport>
Look up a cached investigation report by cache key.
Sourcefn put(&self, key: String, report: InvestigationReport)
fn put(&self, key: String, report: InvestigationReport)
Insert or replace a cached investigation report.
Sourcefn invalidate(&self, key: &str)
fn invalidate(&self, key: &str)
Invalidate a single cache key.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl InvestigationReportCache for MemoryInvestigationCache
impl InvestigationReportCache for RedisInvestigationCache
Available on crate feature
redis-cache only.