MCPcopy
hub / github.com/github/docs / cacheAggressively

Function cacheAggressively

middleware/archived-enterprise-versions.js:44–53  ·  view source on GitHub ↗
(res)

Source from the content-addressed store, hash-verified

42// Combine all the things you need to make sure the response is
43// aggresively cached.
44const cacheAggressively = (res) => {
45 archivedCacheControl(res)
46
47 // This sets a custom Fastly surrogate key so that this response
48 // won't get updated in every deployment.
49 // Essentially, this sets a surrogate key such that Fastly
50 // doesn't do soft-purges on these responses on every
51 // automated deployment.
52 setFastlySurrogateKey(res, SURROGATE_ENUMS.MANUAL)
53}
54
55// The way `got` does retries:
56//

Callers 1

Calls 1

setFastlySurrogateKeyFunction · 0.90

Tested by

no test coverage detected