Expand description
Redis cache functionality module.
This module provides Redis caching capabilities for the application, including connection management and pooling. It exposes the necessary types and functions for interacting with the Redis cache infrastructure.
The main components are:
Cache: The main struct for managing Redis connectionsConnectionPool: A connection pool for Redis clients
§Example
use std::time::Duration;
use darkwing::cache::Cache;
async fn example() -> anyhow::Result<()> {
let cache = Cache::connect(
"redis://127.0.0.1:6379",
5,
Duration::from_secs(10)
)?;
Ok(())
}Modules§
- Redis cache connection management module.
Structs§
- Represents a Redis cache connection manager.
Type Aliases§
- Type alias for the Redis connection pool.