Options for the transparent response-caching middleware.
ttlSeconds: number
Per-route TTL override in seconds.
key: (ctx: IRequestContext) => string
Custom cache key generator. Defaults to
${request.method}:${request.url}.
The tenant discriminator segment is composed around this key too, so a tenant-aware application stores one entry per tenant regardless.
vary: (ctx: IRequestContext) => readonly string[]
Per-request discriminator values appended to the cache key after the tenant segment. Each returned string is length-prefixed and joined in order, so two requests differing in any value never share an entry. Omitted leaves the key unchanged.
bypass: (ctx: IRequestContext) => boolean
Bypass function — when true, skip caching entirely for this
request and pass through to the handler.
store: string
Capability token for the cache store to use. Defaults to
CAPABILITIES.CACHE.
cacheableStatuses: number[]
HTTP status codes eligible for caching. Defaults to [200].