IDistributedCache (Redis, NCache, SQL Server cache, FusionCache, …) and you want tasks on that abstraction. Prefer Redis when the cache is Redis and you need pub/sub.
Intended how-to
- Add
McpEssentials.DistributedCache. - Serialize the canonical
StoredMcpTaskrecord with source-generated JSON. Keymcp:task:{taskId}. - Register the store as a singleton with the same current-user factory as Authenticated tasks.
IDistributedCachehas no pub/sub. For multi-nodeElicitAsync, registerIMcpTaskInputSignalBus. Single-node hosts can skip the bus.
TTL
Set cache entry expiry fromDiscardAfter (CreatedAt + 2×TimeToLive). A missing key is not found.
See Stores.