StackExchange.Redis.Extensions  by imperugo

Extends .NET Redis with advanced features and AI integration

Created 11 years ago
623 stars

Top 52.6% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This library extends StackExchange.Redis for .NET applications, simplifying the storage and retrieval of complex .NET objects. It offers automatic serialization, robust connection pooling, and higher-level APIs, significantly reducing boilerplate code for developers. The project also includes AI-ready features, providing tools for AI coding assistants to aid in configuration, scaffolding, and troubleshooting.

How It Works

The library acts as a wrapper around the core StackExchange.Redis library, enhancing it with essential features like multiple serialization providers (System.Text.Json, Newtonsoft, Protobuf, etc.) and sophisticated connection pooling strategies (LeastLoaded, RoundRobin). It enables seamless persistence of complex .NET types by abstracting away serialization and deserialization logic. Additionally, it integrates AI capabilities through a Claude Code plugin and an llms.txt file, facilitating AI-assisted development workflows.

Quick Start & Requirements

  • Installation: Install core, serializer, and ASP.NET Core integration packages via NuGet (StackExchange.Redis.Extensions.Core, StackExchange.Redis.Extensions.System.Text.Json, StackExchange.Redis.Extensions.AspNetCore).
  • Configuration: Define Redis connection details in appsettings.json.
  • Registration: Register the Redis client in ASP.NET Core DI using AddStackExchangeRedisExtensions<TSerializer>(config).
  • Prerequisites: .NET Standard 2.1, .NET 8+, and a running Redis server.
  • Docs: Full documentation is available in the doc/ folder.

Highlighted Details

  • Supports multiple serialization formats including System.Text.Json, Newtonsoft, Protobuf, MsgPack, and MemoryPack.
  • Features transparent compression with GZip, Brotli, LZ4, Snappy, and Zstandard.
  • Includes advanced Redis features like Pub/Sub with typed handlers, GeoSpatial indexes, and Redis Streams with consumer group support.
  • Offers per-field hash expiry (requires Redis 7.4+) and integrates with Azure Managed Identity and OpenTelemetry.
  • Provides AI-ready tools, including a Claude Code plugin for enhanced developer assistance.

Maintenance & Community

The project acknowledges contributions from various individuals and provides a CONTRIBUTING.md file for potential contributors. No specific community channels (like Discord/Slack) or roadmap links are detailed in the README.

Licensing & Compatibility

The library is distributed under the permissive MIT license, allowing for broad compatibility with commercial and closed-source applications.

Limitations & Caveats

Certain advanced features, such as per-field hash expiry, require specific Redis server versions (7.4+). The AI-specific tooling is currently presented as a plugin for Claude Code, indicating a potential dependency on that particular AI coding assistant ecosystem.

Health Check
Last Commit

5 days ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
1 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.