Skip to main content

Module cache

Module cache 

Source
Expand description

Response caching middleware for the proxy.

Caches ReadResource and CallTool responses with per-backend TTL. Cache keys are derived from the request type, name/URI, and arguments.

§Configuration

[[backends]]
name = "slow-api"
transport = "http"
url = "http://localhost:8080"

[backends.cache]
resource_ttl_seconds = 300
tool_ttl_seconds = 60
max_entries = 1000

Structs§

CacheHandle
Shared handle for querying cache stats and clearing caches.
CacheService
Tower service that caches resource reads and tool call results.
CacheStatsSnapshot
Snapshot of cache statistics for a single backend.