IDistributedCache when the cache is Redis and you need fan-out.
When to use it
- The host already runs Redis.
- Tasks should vanish with
EXPIRE/EXPIREATfromDiscardAfter. - Several nodes wait on
ElicitAsyncand can subscribe to a Redis channel.
Intended how-to
- Add
McpEssentials.Redisand aConnectionMultiplexer. - Keys:
- Register the store as a singleton with the same current-user factory as Authenticated tasks.
CreateTaskAsyncusesSETwith replica wait (Wait/waitReplicas) so a later get on any node can see the row. Eventually-consistent Redis without wait is not SEP-2663 compliant.- Terminal transitions use a Lua script that checks status before writing.
Events
InputResponseReceived. Payload is task id plus request id.
TTL
EXPIREAT on the task key from DiscardAfter (CreatedAt + 2×TimeToLive). No sweeper required. Core SweepExpiredAsync is a no-op; Redis owns expiry.
See Stores.