cachescope

package
v1.172.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cachescope decides the cacheScope every cacheable MCP result carries under protocol revision 2026-07-28 (#2794).

Index

Constants

View Source
const (
	// Private limits reuse of a result to the authorization
	// context that received it.
	Private = "private"
	// Public lets any client or intermediary serve a result across
	// authorization contexts: it holds nothing that depends on the caller.
	Public = "public"
)

The cacheScope values of protocol revision 2026-07-28 (CacheableResult).

Variables

This section is empty.

Functions

func Of

func Of(method string) string

Of is the cache scope a method's result carries, "" for a method whose result is not cacheable.

func Stamp

func Stamp(method string, result mcp.Result)

Stamp sets the cache scope a method's result carries. pkg/middleware's outermost result layer calls it, so a result a middleware built itself (a managed resource read) is decided by the same table as one the SDK's handler built. ttlMs is left as it is: no result here has a freshness bound.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL