Part of DKNet.AspCore.Idempotency.RedisStore. Use the combined registration to select the store, not just its infrastructure:
using DKNet.AspCore.Idempotency.RedisStore;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddLogging();
services.AddIdempotencyWithRedisStore("localhost:6379", o => o.CachePrefix = "orders:idem:");
Console.WriteLine("Redis services registered; connection opens when resolved.");
IdempotencyRedisSetup is the sole public type in this package:
| Method | Registers |
|---|---|
AddIdempotencyRedisStore(string) |
IDistributedCache through AddStackExchangeRedisCache and singleton IConnectionMultiplexer through a ConnectionMultiplexer.Connect factory, each only if absent. |
AddIdempotencyRedisStore(IConnectionMultiplexer) |
Supplied multiplexer as singleton only if absent; no distributed cache. |
AddIdempotencyWithRedisStore(string, Action<IdempotencyOptions>?) |
The string infrastructure overload, then the internal store through core AddIdempotentKey<TStore>. |
Register an existing multiplexer first if it should win; the combined call then reuses it, although it still registers IDistributedCache if that contract is absent. The store talks directly to multiplexer.GetDatabase(), not the distributed-cache abstraction.
The combined callback configures core key validation, scope, and retention. There is no Redis-specific options class.
The package overview shows the host registrations and dependencies behind this capability. The core filter and selected store have separate responsibilities.