Backplane.McpProtocol.Protocol.CacheHint (backplane_mcp_protocol v0.6.0)

Copy Markdown

Cache metadata carried by cacheable MCP 2026-07-28 results.

Cache hints stay in their wire spelling when added to protocol result maps.

Summary

Types

scope()

@type scope() :: :public | :private

t()

@type t() :: %Backplane.McpProtocol.Protocol.CacheHint{
  scope: scope(),
  ttl_ms: non_neg_integer()
}

Functions

cacheable_method?(method)

@spec cacheable_method?(term()) :: boolean()

default()

@spec default() :: t()

new(attrs)

@spec new(map()) ::
  {:ok, t()} | {:error, {:invalid_ttl_ms | :invalid_cache_scope, term()}}

parse(result)

@spec parse(map()) ::
  {:ok, t()} | {:error, {:invalid_ttl_ms | :invalid_cache_scope, term()}}

put(result, cache_hint)

@spec put(map(), t()) :: map()