use crate::error::Result;
use async_trait::async_trait;
use std::time::Duration;
#[async_trait]
pub trait CacheManager: Send + Sync {
async fn has(&mut self, key: &str) -> Result<bool>;
async fn get(&mut self, key: &str) -> Result<Option<String>>;
async fn set(&mut self, key: &str, value: &str, ttl_seconds: u64) -> Result<()>;
async fn remove(&mut self, key: &str) -> Result<()>;
async fn disconnect(&mut self) -> Result<()>;
async fn is_healthy(&self) -> Result<bool> {
Ok(true)
}
async fn ttl(&mut self, key: &str) -> Result<Option<Duration>>;
}