imperugo / imperugo/StackExchange.Redis.Extensions
Implement IHybridCache adapter (.NET 9+)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 628
- Forks
- 177
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Implement Microsoft.Extensions.Caching.Hybrid.HybridCache backed by StackExchange.Redis.Extensions.
What is HybridCache
HybridCache (.NET 9+) combines L1 (in-memory) and L2 (distributed) caching with stampede protection. It's the recommended caching abstraction going forward, replacing IDistributedCache for most scenarios.
Proposed Integration
services.AddStackExchangeRedisExtensions<SystemTextJsonSerializer>(config);
services.AddRedisHybridCache(); // registers HybridCache with Redis as L2
Considerations
- Requires .NET 9+ (net9.0/net10.0 TFMs only)
- Needs `IDistributedCache` as a prerequisite (#632)
- Stampede protection is built into HybridCache — we just need the L2 backend
- Serialization should use our `ISerializer` for consistency
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed AddRedisHybridCache entry point and the IDistributedCache prerequisite in issue #632. Confirm how Microsoft.Extensions.Caching.Hybrid.HybridCache can use Redis as L2 and the existing ISerializer, targeting net9.0/net10.0; done means the service registration provides HybridCache with Redis-backed L2 caching and consistent serialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, redis
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100