use std::sync::Arc;
use serde_json::Value;
pub trait CacheStore: Send + Sync {
fn id(&self) -> &'static str;
fn get_json(&self, namespace: &str, key: &str) -> Option<Value>;
fn put_json(&self, namespace: &str, key: &str, value: Value, ttl_secs: Option<u64>);
fn delete(&self, namespace: &str, key: &str) -> bool;
fn clear_namespace(&self, namespace: &str);
}
pub type DynCacheStore = Arc<dyn CacheStore>;