Skip to main content

CacheProvider

Trait CacheProvider 

Source
pub trait CacheProvider {
    // Required methods
    fn get_stats(&self) -> CacheStats;
    fn reset_metrics(&self);
    fn has_performance_issues(&self) -> bool;
    fn get_recommendations(&self) -> Vec<String>;
}
Expand description

Trait for generic cache operations

Required Methods§

Source

fn get_stats(&self) -> CacheStats

Returns a snapshot of cache statistics

Source

fn reset_metrics(&self)

Resets all metric counters to zero

Source

fn has_performance_issues(&self) -> bool

Returns true if the cache exhibits performance problems

Source

fn get_recommendations(&self) -> Vec<String>

Returns actionable recommendations for improving cache performance

Implementors§

Source§

impl<K, V> CacheProvider for Cache<K, V>
where K: Hash + Eq + Clone + Send + Sync + 'static, V: Clone + Send + Sync + 'static,