Record: HttpCacheConfig

Defines the HTTP response cache configuration. By default the no-cache directive is setted to the cache-control header. In addition to that etag and last-modified headers are also added for cache validation.

Closed record

Fields

  • mustRevalidate boolean(default true)
  • Sets the must-revalidate directive

  • noCache boolean(default false)
  • Sets the no-cache directive

  • noStore boolean(default false)
  • Sets the no-store directive

  • noTransform boolean(default false)
  • Sets the no-transform directive

  • isPrivate boolean(default false)
  • Sets the private and public directives

  • proxyRevalidate boolean(default false)
  • Sets the proxy-revalidate directive

  • maxAge decimal(default 3600)
  • Sets the max-age directive. Default value is 3600 seconds

  • sMaxAge decimal(default -1)
  • Sets the s-maxage directive

  • noCacheFields string[ ](default [])
  • Optional fields for the no-cache directive. Before sending a listed field in a response, it must be validated with the origin server

  • privateFields string[ ](default [])
  • Optional fields for the private directive. A cache can omit the fields specified and store the rest of the response

  • setETag boolean(default true)
  • Sets the etag header for the given payload

  • setLastModified boolean(default true)
  • Sets the current time as the last-modified header