Skip to main content

Cache

Trait Cache 

Source
pub trait Cache {
    // Required methods
    fn get(&self, query: &str) -> Option<Bytes>;
    fn set(&self, query: &str, response: &Bytes);
}
Expand description

The trait representing a caching backend

Required Methods§

Source

fn get(&self, query: &str) -> Option<Bytes>

Get a cached value, or None

Source

fn set(&self, query: &str, response: &Bytes)

Set a value in the cache

Implementors§