cachehints

package
v2.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

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