Courseiva
Google Cloud products, services, and solutionsmediumMultiple ChoiceObjective-mapped

Cloud Digital Leader Practice Question: Google Cloud products, services, and solutions

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?

⚠ Common 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'.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Verify that the origin server sets appropriate Cache-Control headers (e.g., max-age=3600).

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.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Verify that the origin server sets appropriate Cache-Control headers (e.g., max-age=3600).

    Why this is correct

    Verify that the origin server sets appropriate Cache-Control headers (e.g., max-age=3600) is the correct fix because Cloud CDN explicitly honors the Cache-Control header from the origin. If the origin omits max-age or sets it too low, the CDN caches for a shorter period and re-fetches from origin more frequently, causing content to be served as stale sooner. Setting max-age=3600 explicitly instructs edge caches to treat content as fresh for one hour, balancing user-perceived freshness with reduced origin load.

  • Enable cache invalidation for all objects daily.

    Why it's wrong here

    Enabling cache invalidation for all objects daily is a reactive measure that forces the CDN to purge objects before their natural expiry, but it does not address why the content is stale in the first place. Mass invalidation adds operational overhead, incurs costs, and may temporarily increase latency or origin load as caches refill. Properly configured Cache-Control headers would make routine invalidation unnecessary, so this approach treats the symptom rather than the root cause.

  • Increase the TTL in the CDN configuration to 24 hours.

    Why it's wrong here

    Increasing the TTL in the CDN configuration to 24 hours would make edge caches retain and serve content for a full day, even if the origin's content updates sooner. This directly worsens freshness, serving stale content for up to 24 hours, and does not correct a missing or low Cache-Control header from the origin. The CDN-level TTL acts only as a fallback cap or default; it cannot override an explicit origin max-age, so it fails to solve the reported staleness.

  • Use Cloud Storage as the origin and set caching to 'public'.

    Why it's wrong here

    Using Cloud Storage as the origin and setting caching to 'public' does not, by itself, solve stale content because 'public' merely permits shared caches to store the response; it specifies no duration. Cloud Storage objects still need a Cache-Control metadata value with max-age to tell Cloud CDN how long to cache; without that, the CDN falls back to defaults or the origin's other headers. This change might help if combined with proper headers, but as described it does not address the actual root cause of missing or insufficient freshness headers.

About these practice questions

One of 829 original GCDL practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This GCDL practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GCDL exam.