MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / cacheControlFor

Function cacheControlFor

src/ui-server/static.ts:54–59  ·  view source on GitHub ↗
(relativePath: string)

Source from the content-addressed store, hash-verified

52 * it must never be cached.
53 */
54export function cacheControlFor(relativePath: string): string {
55 const normalized = relativePath.split(path.sep).join('/');
56 return normalized.startsWith('assets/')
57 ? 'public, max-age=31536000, immutable'
58 : 'no-store';
59}
60
61/**
62 * Stream a file as the response body.

Callers 2

ui-server.test.tsFile · 0.90
sendFileFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected