The cache key defines what can be reused
How cache keys, freshness rules, and the cache hierarchy determine content reuse and requests reaching the origin. · advanced
Start with cache identity, not cache duration. A cache policy controls which query strings, HTTP headers, and cookies participate in the cache key. Including a varying value separates requests into different cached variants; excluding an unnecessary distinction lets more requests reuse the same variant.
Choose those distinctions around the content the origin actually returns. A language header that changes the representation belongs in the identity; a tracking value that does not change it only fragments reuse. A long freshness lifetime cannot make requests with different keys share one cached variant.
Every value included in the cache key is automatically forwarded in origin requests. Cache identity therefore also determines part of what the origin receives. CloudFront offers managed cache policies for common uses and supports custom policies when their selection of values does not fit.
AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.