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