# 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
```rust
use mx_cache::{LocalCache, RedisCache, Cache};
use std::time::Duration;
// Local cache
let local = LocalCache::new(10_000, Duration::from_secs(300));
local.set(b"key", b"value", Duration::from_secs(60)).await?;
// Redis cache
let redis = RedisCache::connect("redis://localhost", "prefix").await?;
redis.set(b"key", b"value", Duration::from_secs(60)).await?;
```