
Answer-first summary for fast verification
Answer: Issue a cache invalidation command with pattern /folder-a/*.
To remove cached copies of objects from Cloud CDN before their TTL expires, cache invalidation is required. Option B uses a single invalidation command with the pattern `/folder-a/*`, which targets all cached objects under the specified prefix. Lifecycle rules (A) manage bucket objects, not CDN cache. Restricting object visibility (C) does not purge existing cache entries. Disabling and re-enabling CDN (D) is inefficient and does not guarantee immediate cache clearance. Thus, B is the correct and minimal solution.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You have a storage bucket with the following objects:
folder-a/image-a-1.jpg
folder-a/image-a-2.jpg
folder-b/image-b-1.jpg
folder-b/image-b-2.jpg
Cloud CDN is enabled on the bucket, and all four objects are cached. You need to invalidate the cached copies of all objects with the prefix folder-a using the fewest commands possible. What should you do?
A
Add an appropriate lifecycle rule on the storage bucket.
B
Issue a cache invalidation command with pattern /folder-a/*.
C
Make sure that all the objects with prefix folder-a are not shared publicly.
D
Disable Cloud CDN on the storage bucket. Wait 90 seconds. Re-enable Cloud CDN on the storage bucket.