Optionalinit: HeadersInitOptionalcdn: CDNReturns an iterator allowing to go through all key/value pairs contained in this object.
OptionalthisArg: anyThe parsed cache-control header for the browser cache.
The parsed content of the cache tags header.
The parsed cache-control header for the CDN cache.
Sets cache headers for content that should be cached for a long time and never revalidated. The CDN cache will cache the content for the specified time, and the browser will cache the content indefinitely without revalidating. Do not use this unless the URL is fingerprinted or otherwise unique. Otherwise, the browser will cache the content indefinitely and never check for updates, including for new deploys.
The number of seconds to set the CDN cache-control s-maxage directive to. Defaults to 1 year.
Returns an iterator allowing to go through all keys of the key/value pairs contained in this object.
Sets stale-while-revalidate directive for the CDN cache. By default the browser is sent a must-revalidate directive to ensure that the browser always revalidates the cache with the server.
The number of seconds to set the stale-while-revalidate directive to. Defaults to 1 week.
Adds a cache tag to the cache tags header. Cache tags are used to invalidate the cache for a URL.
The cache tag to add. Can be a string or an array of strings.
Returns the headers as a plain object.
Sets the s-maxage for items in the CDN cache. This is the maximum amount of time that the CDN will cache the content. If used with swr, the content will revalidate in the background after the max age has passed. Otherwise, the content will be removed from the cache after the max age has passed.
Returns an iterator allowing to go through all values of the key/value pairs contained in this object.
MDN Reference