News for hackers. Stuff that matters.
Re:Making AWS News stupid fast with smart caching by palsecam on Wednesday December 04, 2024 @03:39AM (#42315617)
See also: the `stale-while-revalidate` and `immutable` HTTP Cache-Control directives.

Stale-while-revalidate: see https://web.dev/articles/stale-while-revalidate & https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ca...

Immutable: https://datatracker.ietf.org/doc/html/rfc8246 & https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ca...

And if, like in the article, you’re using a CDN, `s-maxage` (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ca...) is quite useful. Set it to a long time, and purge the CDN cache on deploy.

There are no comments on this comment yet.