rok-cache 0.1.0

Cache façade for the rok ecosystem — Memory/Redis drivers, Cache::get/set/remember
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
pub enum CacheError {
    #[error("cache not configured — add CacheLayer to your router")]
    NotConfigured,
    #[error("serialization error: {0}")]
    Serialize(String),
    #[error("deserialization error: {0}")]
    Deserialize(String),
    #[error("fetch error: {0}")]
    Fetch(String),
    #[cfg(feature = "redis")]
    #[error("redis error: {0}")]
    Redis(String),
    #[cfg(feature = "redis")]
    #[error("CACHE_DRIVER=redis requires REDIS_URL to be set")]
    MissingRedisUrl,
}