Trait Cache

Source
pub trait Cache: Send + Sync {
    // Required methods
    fn get(&self, key: &str) -> Option<String>;
    fn set(&self, key: &str, value: String) -> Result<(), CacheError>;
}
Expand description

Cache service trait

Required Methods§

Source

fn get(&self, key: &str) -> Option<String>

Source

fn set(&self, key: &str, value: String) -> Result<(), CacheError>

Implementors§