A company uses Cloud CDN to deliver static content. They notice that some content is being served stale despite a TTL of 1 hour. What should they check to ensure content is always fresh?
Cloud CDN respects the Cache-Control header from the origin; if it is missing or set to a lower value, content may become stale sooner.
Why this answer
Option A is correct because Cloud CDN relies on the Cache-Control: max-age directive from the origin server to determine how long content should be considered fresh. If the origin does not set max-age=3600 (or a comparable value), Cloud CDN may serve stale content even if the CDN TTL is configured to 1 hour, as the CDN respects the origin's cache headers by default. Ensuring the origin sets appropriate Cache-Control headers guarantees that Cloud CDN caches content for the intended duration.
Exam trap
Google Cloud often tests the misconception that CDN TTL settings alone control freshness, when in reality the origin's Cache-Control headers are authoritative unless overridden by explicit CDN policies like 'cache modes' or 'origin override'.
How to eliminate wrong answers
Option B is wrong because daily cache invalidation is a reactive, manual process that does not prevent stale content between invalidations; it also incurs cost and latency, and does not address the root cause of stale serving due to missing or incorrect Cache-Control headers. Option C is wrong because increasing the TTL to 24 hours would make the problem worse by extending the time stale content is served, rather than ensuring freshness. Option D is wrong because setting caching to 'public' in Cloud Storage only affects browser caching, not Cloud CDN's edge caching behavior; Cloud CDN still requires proper Cache-Control headers from the origin to honor freshness.