CloudFront Caching
- We can cache based on
- Headers
- Session Cookies
- Query String Parameters
- Cache lives at each Cloudfront Edge Location
- We want to maximise cache hit and minimise requests to origin
- We can control the TTL of the cache (0 seconds to 1 year). It can be set by Cache Control header, Expires header
- Invalidate cache using CreateInvalidation API
- We can separate static and dynamic distribution