use crate::error::Result;
#[async_trait::async_trait]
pub trait TtlControl: Send + Sync {
async fn get_l1_ttl(&self, key: &str) -> Result<Option<u64>>;
async fn get_l2_ttl(&self, key: &str) -> Result<Option<u64>>;
async fn get_ttl(&self, key: &str) -> Result<Option<u64>>;
async fn refresh_l1_ttl(&self, key: &str, ttl: u64) -> Result<bool>;
async fn refresh_l2_ttl(&self, key: &str, ttl: u64) -> Result<bool>;
async fn refresh_ttl(&self, key: &str, ttl: u64) -> Result<bool>;
async fn touch(&self, key: &str) -> Result<bool>;
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_ttl_control_exists() {
let _ = std::marker::PhantomData::<dyn TtlControl>;
}
}