cacheControl
cacheControl: (
options?) =>Function
Defined in: http/cache-control.js:49
Creates a Cache-Control middleware that returns a pre-computed header tuple.
Parameters
Section titled “Parameters”options?
Section titled “options?”Cache-Control configuration
directives?
Section titled “directives?”string
Raw directive string (takes precedence over structured options)
immutable?
Section titled “immutable?”boolean = false
Add immutable directive
maxAge?
Section titled “maxAge?”number
max-age value in seconds
mustRevalidate?
Section titled “mustRevalidate?”boolean = false
Add must-revalidate directive
noCache?
Section titled “noCache?”boolean = false
Add no-cache directive
noStore?
Section titled “noStore?”boolean = false
Add no-store directive
noTransform?
Section titled “noTransform?”boolean = false
Add no-transform directive
private?
Section titled “private?”boolean = false
Add private directive
proxyRevalidate?
Section titled “proxyRevalidate?”boolean = false
Add proxy-revalidate directive
public?
Section titled “public?”boolean = false
Add public directive
sMaxAge?
Section titled “sMaxAge?”number
s-maxage value in seconds
staleIfError?
Section titled “staleIfError?”number
stale-if-error value in seconds
staleWhileRevalidate?
Section titled “staleWhileRevalidate?”number
stale-while-revalidate value in seconds
Returns
Section titled “Returns”Function
- Ergo middleware
() => Array<[string, string]>