pub trait DeboaCache {
// Required methods
fn get(&self, key: &str) -> Option<String>;
fn set(&self, key: &str, value: &str);
fn delete(&self, key: &str);
}Expand description
A trait defining the interface for cache implementations.
Implement this trait to provide custom caching behavior for HTTP responses. The cache is responsible for storing and retrieving responses based on their cache keys.
§Thread Safety
Implementations must be thread-safe as they may be accessed concurrently from multiple threads.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".