// staticdata.dev — httpCacheDirectives
// Generated file. Do not edit by hand.
// SPDX-License-Identifier: MIT

export const httpCacheDirectives = [
  {
    "directive": "max-age",
    "type": "both",
    "description": "Specifies the maximum time in seconds that a response is considered fresh. In a request, it limits the age of an acceptable cached response."
  },
  {
    "directive": "max-stale",
    "type": "request",
    "description": "Indicates the client is willing to accept a stale response, optionally limited to a maximum staleness in seconds."
  },
  {
    "directive": "min-fresh",
    "type": "request",
    "description": "Indicates the client is willing to accept a response whose freshness lifetime is at least the specified number of seconds in the future."
  },
  {
    "directive": "must-revalidate",
    "type": "response",
    "description": "Indicates that the response must not be used after it becomes stale. Caches must revalidate with the origin server before serving a stale response."
  },
  {
    "directive": "must-understand",
    "type": "response",
    "description": "A cache should only store the response if it understands the requirements for caching based on the status code. Introduced in RFC 9111."
  },
  {
    "directive": "no-cache",
    "type": "both",
    "description": "In a response, requires the cache to revalidate with the origin server before serving the stored response. In a request, forces a revalidation regardless of freshness."
  },
  {
    "directive": "no-store",
    "type": "both",
    "description": "Directs caches not to store any part of the request or response. The response must not be stored in any cache."
  },
  {
    "directive": "no-transform",
    "type": "both",
    "description": "Instructs intermediaries not to transform the payload, such as compressing images or converting formats."
  },
  {
    "directive": "only-if-cached",
    "type": "request",
    "description": "Indicates that the client only wishes to obtain a stored response. If no suitable response is in cache, the cache should respond with 504 Gateway Timeout."
  },
  {
    "directive": "private",
    "type": "response",
    "description": "Indicates that the response is intended for a single user and must not be stored by shared caches. Private (browser) caches may store the response."
  },
  {
    "directive": "proxy-revalidate",
    "type": "response",
    "description": "Like must-revalidate, but applies only to shared caches (proxies). Private caches may use stale responses."
  },
  {
    "directive": "public",
    "type": "response",
    "description": "Indicates that the response may be stored by any cache, even if it would otherwise be non-cacheable (e.g., responses to authenticated requests)."
  },
  {
    "directive": "s-maxage",
    "type": "response",
    "description": "Overrides max-age for shared caches only. Ignored by private caches. Specifies the maximum time in seconds that a shared cache considers the response fresh."
  },
  {
    "directive": "stale-if-error",
    "type": "both",
    "description": "In a response, indicates that a stale response may be used if an error (such as a 5xx status) is encountered while revalidating, for the specified number of seconds after it became stale; in a request, the client indicates it will accept such a stale response. Defined in RFC 5861."
  },
  {
    "directive": "stale-while-revalidate",
    "type": "response",
    "description": "Allows a cache to serve a stale response while asynchronously revalidating it in the background, for the specified number of seconds after expiry. Defined in RFC 5861."
  },
  {
    "directive": "immutable",
    "type": "response",
    "description": "Indicates that the response body will not change over time, so a client should not send a conditional revalidation request during its freshness lifetime."
  }
] as const;

export type CacheDirective = (typeof httpCacheDirectives)[number];
