use once_cell::sync::OnceCell;
use serde_json::Value;
use tokio::sync::Mutex;

// Minimal async Redis-like client trait with only methods used here.
pub struct DummyRedisClient;

impl DummyRedisClient {
    pub async fn get(&self, _key: &str) -> Result<Value, ()> {
        Ok(Value::Null)
    }

    pub async fn set_with_ttl(&self, _key: &str, _value: &Value, _ttl_secs: u64) -> Result<(), ()> {
        Ok(())
    }
}

pub static GLOBAL_REDIS: OnceCell<Mutex<DummyRedisClient>> = OnceCell::new();
