use crate::{async_trait, CacheResult};

#[async_trait]
pub trait CacheDriver: Sync + Send {
    async fn has(&self, key: &str) -> CacheResult<bool>;

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

    async fn insert(&self, key: &str, value: &str) -> CacheResult<()>;

    async fn remove(&self, key: &str) -> CacheResult<()>;

    async fn clear(&self) -> CacheResult<()>;
}
