Documentation
¶
Overview ¶
Package cachehints applies SEP-2549 cache hints (ttlMs/cacheScope) to MCP results. Every catalog in this server is token- and tier-dependent (PAT scope filtering, licensing-tier gating), so all cacheable results are marked "private": shared intermediaries must never serve one user's catalog to another. TTLs distinguish stable catalogs from live GitLab data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware(opts Options) mcp.Middleware
Middleware returns a receiving middleware that stamps cache hints on every CacheableResult according to the package policy.
Types ¶
type Options ¶ added in v2.7.0
type Options struct {
// TierPinned reports that the licensing tier was configured rather than
// detected from the instance license, so it cannot change while the
// server runs. It lifts the tool catalog to the same one-hour window as
// the catalogs compiled into the binary.
//
// A token's scopes are still detected per pool entry and also filter the
// catalog, but that variation is bounded by the client's own token and
// every hint is stamped "private", so no other client can observe it.
TierPinned bool
}
Options configures the freshness windows the middleware stamps.
Click to show internal directories.
Click to hide internal directories.