4da57a228d7a796d3e5c221a330538c9f6f74968
personal-website
Joe Carstairs' personal website
Invalidating the CloudFront cache
When you update pages, you’ll need to invalidate the CloudFront cache in order for CloudFront to serve the new versions before the caches expire (which could be a while). Here’s how to do it:
- Go to the CloudFront console
- Select the distribution for this website
- Go to the Invalidations tab
- Add a new Invalidation
- Include all pages you’ve updated
- Use the relative URL, not the filepath, e.g. "/blog/" not "/blog/index.html"
- Include the trailing "/" or it won’t work
- You can use wildcards to make life easier, e.g. "/blog/2024/01/29/*"
Languages
TypeScript
32.2%
MDX
23.6%
Astro
22.1%
CSS
19.4%
JavaScript
1.4%
Other
1.3%