Options for cacheApiMiddleware.
The cache handle. Omitted resolves caches.default from the global scope;
when that is also absent — every runtime other than Cloudflare Workers —
the middleware passes through instead of throwing.
key: (ctx: IRequestContext) => string
Builds the cache key from the request. Omitted uses the full request URL, which is what the platform's own cache keys on.
bypass: (ctx: IRequestContext) => boolean
Returning true skips the cache entirely for this request.
cacheableStatuses: readonly number[]
Statuses worth caching. Defaults to [200]. Does not override the
platform's unconditional refusal of 206.
ttlSeconds: number
Adds Cache-Control: public, max-age=<n> to the stored copy when the
response carries no Cache-Control of its own. The edge honors the stored
response's own directive, so without one an entry has no freshness lifetime
and is of little use. The client's response is left untouched.