mx-cache
Shared caching utilities with local (Moka) and distributed (Redis) support.
Features
- LocalCache: In-memory cache with TTL using Moka
- RedisCache: Distributed cache with Redis
- Unified API: Same interface for both backends
Usage
use ;
use Duration;
// Local cache
let local = new;
local.set.await?;
// Redis cache
let redis = connect.await?;
redis.set.await?;