#![allow(dead_code)]
use std::collections::HashMap;
use crate::value::{CasValue, Value};
use crate::{Expiration, Result};
use async_trait::async_trait;
#[async_trait]
pub(crate) trait Cacheable: Send + Sync {
async fn get(&self, key: &str) -> Result<Option<Value>>;
async fn get_multi(&self, keys: &[&str]) -> Result<HashMap<String, Value>>;
async fn set(&self, key: &str, value: Value, expire: Expiration) -> Result<bool>;
async fn set_with_noreply(&self, key: &str, value: Value, expire: Expiration) -> Result<()>;
async fn add(&self, key: &str, value: Value, expire: Expiration) -> Result<bool>;
async fn get_cas(&self, key: &str) -> Result<Option<CasValue>>;
async fn cas(&self, key: &str, value: &CasValue, expire: Expiration) -> Result<bool>;
async fn delete(&self, key: &str) -> Result<bool>;
async fn delete_with_noreply(&self, key: &str) -> Result<()>;
}