#redis #cache #async #redis-cache

armature-redis

Redis client integration for Armature - connection pooling, pub/sub, and DI-ready

2 releases

0.1.1 Dec 30, 2025
0.1.0 Dec 27, 2025

#18 in #redis-cache

Download history 87/week @ 2025-12-31 59/week @ 2026-01-07 68/week @ 2026-01-14 2/week @ 2026-01-21 24/week @ 2026-01-28 43/week @ 2026-02-04 96/week @ 2026-02-11 148/week @ 2026-02-18 353/week @ 2026-02-25 253/week @ 2026-03-04 123/week @ 2026-03-11 23/week @ 2026-03-18 7/week @ 2026-03-25 32/week @ 2026-04-01

205 downloads per month
Used in 6 crates (5 directly)

Apache-2.0

34KB
684 lines

armature-redis

Redis client integration for the Armature framework.

Features

  • Connection Pooling - Efficient connection management
  • Async Operations - Non-blocking Redis commands
  • Pub/Sub - Real-time messaging
  • Cluster Support - Redis Cluster mode
  • Streams - Redis Streams for event sourcing

Installation

[dependencies]
armature-redis = "0.1"

Quick Start

use armature_redis::RedisClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = RedisClient::new("redis://localhost:6379").await?;

    // Basic operations
    client.set("key", "value").await?;
    let value: String = client.get("key").await?;

    // With expiration
    client.set_ex("temp_key", "value", 60).await?;

    Ok(())
}

Pub/Sub

// Subscribe
let mut subscriber = client.subscribe("channel").await?;
while let Some(message) = subscriber.next().await {
    println!("Received: {:?}", message);
}

// Publish
client.publish("channel", "Hello!").await?;

License

MIT OR Apache-2.0

Dependencies

~13–29MB
~324K SLoC