tower-http-cache 0.5.0

Tower-compatible caching layer with pluggable backends (in-memory, Redis, and more)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use thiserror::Error;

/// Errors that can occur while interacting with a cache backend.
#[derive(Debug, Error)]
pub enum CacheError {
    #[error("backend error: {0}")]
    Backend(String),

    #[cfg(feature = "redis-backend")]
    #[error(transparent)]
    Redis(#[from] redis::RedisError),
}