Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Latest commit

 

History

History
14 lines (11 loc) · 604 Bytes

staticpagecache.md

File metadata and controls

14 lines (11 loc) · 604 Bytes
id title sidebar_label
staticpagecache
Static pages caching
Static pages caching

Statically rendered pages (i.e. HTML pages that are uploaded to S3) have the following Cache-Control set:

cache-control: public, max-age=0, s-maxage=2678400, must-revalidate

s-maxage allows Cloudfront to cache the pages at the edge locations for 31 days. max-age=0 in combination with must-revalidate ensure browsers never cache the static pages. This allows Cloudfront to be in full control of caching TTLs. On every deployment an invalidation/* is created to ensure users get fresh content.