property CacheApiMiddlewareOptions.ttlSeconds

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.

Type

number

Usage

import { type CacheApiMiddlewareOptions } from "cloudflare-plugin/src/index.ts";