Design Resilient Architectures
An Amazon CloudFront distribution caches a public product page whose language depends on the Accept-Language header. Users sometimes receive the wrong language. Which change preserves caching while separating language variants?
Show the answer
Correct answerD. Include Accept-Language in the cache policy's cache key
AWhy not this: A shorter TTL reduces how long a wrong variant persists but does not distinguish languages.
BWhy not this: Compression changes transfer size, not how language variants are distinguished.
CWhy not this: Forwarding a header without including it in the cache key does not separate cached language variants.
DWhy this is right: The cache key must include the value that determines which language representation is returned.
Including Accept-Language in the cache key creates separate cached variants for different header values. Forwarding the header through an origin request policy alone does not make CloudFront distinguish those variants in its cache.