SOA-C02 Exam QuestionsBrowse all questions from this exam

SOA-C02 Exam - Question 99


A company hosts a static website on Amazon S3. An Amazon CloudFront distribution presents this site to global users. The company uses the Managed-

CachingDisabled CloudFront cache policy. The company's developers confirm that they frequently update a file in Amazon S3 with new information.

Users report that the website presents correct information when the website first loads the file. However, the users' browsers do not retrieve the updated file after a refresh.

What should a SysOps administrator recommend to fix this issue?

Show Answer
Correct Answer: A

The Cache-Control header with max-age=0 forces CloudFront to revalidate the content on every request. This ensures that users always receive the most up-to-date version of the file from the S3 bucket whenever they refresh the page, solving the issue of the browser not retrieving the updated file.

Discussion

8 comments
Sign in to comment
princajenOption: A
Sep 4, 2022

A! You can control how long your files stay in a CloudFront cache before CloudFront forwards another request to your origin. Reducing the duration allows you to serve dynamic content. Increasing the duration means that your users get better performance because your files are more likely to be served directly from the edge cache. A longer duration also reduces the load on your origin. To change the cache duration for an individual file, you can configure your origin to add a Cache-Control header with the max-age or s-maxage directive, or an Expires header to the file. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html

SurferboltOption: A
Oct 17, 2022

A is the answer.

HisayukiOption: A
Mar 3, 2023

You should disable Cache in Browser with Cache-Control: max-age=0.

callspaceOption: A
Oct 3, 2023

link in the comments section states: The Cache-Control max-age directive lets you specify how long (in seconds) that you want an object to remain in the cache before CloudFront gets the object again from the origin server. The minimum expiration time CloudFront supports is 0 seconds. The maximum value is 100 years. And the company continue using the Managed- CachingDisabled CloudFront cache policy.

AtownOption: B
Nov 12, 2022

Would it not be B since Caching is already Disabled?

michaldavidOption: A
Dec 10, 2022

aaaaaaaa

bruppp31
Nov 18, 2023

I think this question is wrong. By having the cache policy set to Managed-CachingDisabled all files will be fetched every time. This is also true of A if we have Managed-CachingOptimized. The answer is probably A but it shouldn't make a difference in this case.

be9z
Jul 3, 2024

By adding a Cache-Control header with max-age=0 to the S3 object, you instruct CloudFront to revalidate the content on every request. When a user refreshes the page, CloudFront checks with S3 to ensure it has the latest version of the file. This approach ensures that users receive the most up-to-date content.