Skip to main content
McpEssentials.DistributedCache is specified and is not in this repository yet.
Use this when the host already registered 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

  1. Add McpEssentials.DistributedCache.
  2. Serialize the canonical StoredMcpTask record with source-generated JSON. Key mcp:task:{taskId}.
  3. Register the store as a singleton with the same current-user factory as Authenticated tasks.
  4. IDistributedCache has no pub/sub. For multi-node ElicitAsync, register IMcpTaskInputSignalBus. Single-node hosts can skip the bus.

TTL

Set cache entry expiry from DiscardAfter (CreatedAt + 2×TimeToLive). A missing key is not found. See Stores.