Google Professional Cloud Network Engineer Question 517
Single answerGoogle Cloud PlatformYour organization is using Cloud CDN to serve static content to users globally. A recent deployment included updates to some static files, but users are still seeing outdated content from the cache. How can you invalidate the outdated cached content across all edge locations?
- A
Use the Cloud CDN cache invalidation API to specify the URL paths to invalidate.
- B
Delete the outdated files from the bucket and re-upload them with the same names.
- C
Update the cache TTL (Time-to-Live) policy in the backend service configuration.
- D
Add a version identifier to the file names and update the links in your application.
Show answer and explanation
Correct answer: A
Explanation
Cloud CDN caches content at edge locations for faster delivery to users. When content updates occur, cached copies at edge locations may not be updated automatically. The Cloud CDN cache invalidation API allows you to specify the URLs of outdated content to be purged from all edge locations, ensuring users receive the latest version.
- A. Correct.
Correct. Using the Cloud CDN cache invalidation API is the recommended way to invalidate specific cached content across all edge locations. This ensures the outdated copies are purged and users receive updated content.
- B. Incorrect.
Incorrect. Deleting and re-uploading files with the same names does not guarantee cache invalidation. Cached content may still be served until it expires or is explicitly invalidated.
- C. Incorrect.
Incorrect. Updating the cache TTL policy will only affect future requests and does not immediately invalidate existing cached content.
- D. Incorrect.
Incorrect. Adding a version identifier to file names requires updating application links and does not invalidate existing cached content. It is a workaround, not a direct solution.