Expand description
Pipeline support for batching Redis commands
This module provides functionality to batch multiple Redis commands together and execute them in a single network round-trip, improving performance when executing multiple operations.
§Examples
use redis_oxide::{Client, ConnectionConfig};
let config = ConnectionConfig::new("redis://localhost:6379");
let client = Client::connect(config).await?;
// Create a pipeline
let mut pipeline = client.pipeline();
// Add commands to the pipeline
pipeline.set("key1", "value1");
pipeline.set("key2", "value2");
pipeline.get("key1");
pipeline.incr("counter");
// Execute all commands at once
let results = pipeline.execute().await?;
println!("Pipeline results: {:?}", results);Structs§
- Pipeline
- A pipeline for batching Redis commands
- Pipeline
Result - Pipeline result wrapper for easier handling
Traits§
- Pipeline
Command - Trait for commands that can be used in pipelines
- Pipeline
Executor - Trait for executing pipelined commands