IDistributedCache (Redis, NCache, SQL Server cache, FusionCache, …) and you want tasks on that abstraction.
When it ships
The cache abstraction is already in DI and a host-supplied bus covers fan-out.
Until then
Prefer Redis when the cache is Redis and you need pub/sub for elicitation.
Intended how-to
1
Add the package
Add
McpEssentials.DistributedCache.2
Key the snapshot
Serialize the canonical
StoredMcpTask record with source-generated JSON. Key mcp:task:{taskId}.3
Register the store
Singleton, same current-user factory as Authenticated tasks.
4
Optional bus
IDistributedCache has no pub/sub. For multi-node ElicitAsync, register IMcpTaskInputSignalBus. Single-node hosts can skip the bus.TTL
Set cache entry expiry fromDiscardAfter (CreatedAt + 2×TimeToLive). A missing key is not found.
Related
Redis
Shipped. Native
PEXPIREAT plus pub/sub.Stores
Pick a backing store by the engine you already run.