cache-headers.ts
This file
Path
apps/web/src/server/cache-headers.ts
10 lines · 476 bytes · TypeScript
Last changed by
Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248
History of this fileTake it
Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248
lines 1–2why, one step back1// No `s-maxage`: a shared cache that honours it stops serving stale while it asks.2// Workers Cache keys by path and query, never by cookie, so a page that gives `branchPage` must read as nobody.Fold every page's project events once, keep Markdown off the first load, and cache what never changesoscabrielbefore adoption38e5215
lines 3–10why, one step back34export const branchPage = {5 "Cache-Control": "public, max-age=30, stale-while-revalidate=300",6} as const satisfies Readonly<Record<string, string>>;78export const personalPage = {9 "Cache-Control": "private, no-store",10} as const satisfies Readonly<Record<string, string>>;