SOA-C02 Question 281
Select 4Your company is using Amazon CloudFront to distribute static assets for a web application. Users report that they are consistently seeing outdated content when accessing the application. You suspect a caching issue in CloudFront. Which action(s) can you take to resolve this problem?
- A
Invalidate specific objects in the CloudFront cache using object paths.
- B
Configure the origin to include a Cache-Control: no-cache header in the response.
- C
Enable CloudFront's Origin Shield to reduce latency.
- D
Perform a full cache invalidation in CloudFront through the AWS Management Console.
- E
Update the object’s file name or include a version identifier in the URL.
Show answer and explanation
Correct answers: A, B, D, E
Explanation
Outdated content in CloudFront cache can be resolved using several methods: invalidating specific cached objects, updating Cache-Control headers to manage caching behavior, performing a full cache invalidation, or employing cache-busting techniques like version identifiers in file names. While Origin Shield improves latency and cache efficiency, it does not directly address outdated content issues.
- A. Correct.
Invalidating specific objects in the cache forces CloudFront to fetch updated content from the origin, resolving the outdated content issue.
- B. Correct.
Setting the Cache-Control: no-cache header at the origin can direct CloudFront to always fetch the latest version of the content, bypassing the cache.
- C. Incorrect.
Enabling Origin Shield optimizes cache performance and reduces origin load, but it does not address outdated content issues.
- D. Correct.
Performing a full cache invalidation clears all cached content in CloudFront, ensuring that updated content is fetched from the origin.
- E. Correct.
Updating the object’s file name or including a version identifier in the URL effectively bypasses the cache, as CloudFront treats it as a new object.