#![allow(async_fn_in_trait)]
#[cfg(feature = "redis")]
pub mod redis;
#[cfg(not(feature = "redis"))]
pub mod no_cache;
pub trait Cache {
type Item;
type Client;
async fn new() -> Self;
async fn get_con(&self) -> Self::Client;
async fn get(&self, id: Self::Item) -> Option<String>;
async fn set(&self, id: Self::Item, content: Self::Item) -> bool;
async fn update(&self, id: Self::Item, content: Self::Item) -> bool;
async fn remove(&self, id: Self::Item) -> bool;
async fn remove_starting_with(&self, id: Self::Item) -> bool;
async fn incr(&self, id: Self::Item) -> bool;
async fn decr(&self, id: Self::Item) -> bool;
}