MCPcopy
hub / github.com/github/docs / languageCacheControl

Function languageCacheControl

middleware/cache-control.js:76–79  ·  view source on GitHub ↗
(res)

Source from the content-addressed store, hash-verified

74// accept-language is truncated to one of our available languages
75// https://bit.ly/3u5UeRN
76export function languageCacheControl(res) {
77 defaultCacheControl(res)
78 res.set('vary', 'accept-language, x-user-language')
79}
80
81// Long cache control for versioned assets: images, CSS, JS...
82export const assetCacheControl = cacheControlFactory(60 * 60 * 24 * 7, { immutable: true })

Callers 2

handleRedirectsFunction · 0.90

Calls 1

defaultCacheControlFunction · 0.85

Tested by

no test coverage detected