MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / applyCacheHeaders

Function applyCacheHeaders

packages/player/tests/perf/server.ts:132–141  ·  view source on GitHub ↗
(res: Response, noCache: boolean)

Source from the content-addressed store, hash-verified

130}
131
132function applyCacheHeaders(res: Response, noCache: boolean): Response {
133 if (noCache) {
134 res.headers.set("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0");
135 res.headers.set("Pragma", "no-cache");
136 res.headers.set("Expires", "0");
137 } else {
138 res.headers.set("Cache-Control", "public, max-age=3600");
139 }
140 return res;
141}
142
143export function startServer(options: ServeOptions = {}): RunningServer {
144 const noCache = options.noCache ?? false;

Callers 1

fetchFunction · 0.85

Calls 1

setMethod · 0.65

Tested by

no test coverage detected