release-cloudflare-worker
release-cloudflare-worker copied to clipboard
Better caching directives
We're serving mostly static and immutable content, but only caching it for 1 or 4 hours (depends on cache type) for successful responses.
I think we should change this so that content that doesn't change (i.e. release assets) are cached for a lot longer than assets that do change (i.e. some directories, index.json).
Specifically, I think they should be something like these:
- for immutable content (release assets, metrics, ...),
public, immutable, max-age=31536000, s-maxage=31536000 - for the things that do change (
index.json, directory listings, ...),public, max-age=86400, s-maxage=86400, must-revalidate
cc @ovflowd
Those constraints seem good enough. @nodejs/web-infra any extra thoughts?