Bird
0
0

If a Cloud CDN-enabled backend service returns content with Cache-Control: max-age=3600, what occurs when a user requests the same resource twice within 20 minutes?

medium📝 Predict Output Q4 of 15
GCP - Cloud Load Balancing
If a Cloud CDN-enabled backend service returns content with Cache-Control: max-age=3600, what occurs when a user requests the same resource twice within 20 minutes?
AThe second request bypasses the cache and fetches fresh content from the origin
BThe second request triggers a cache revalidation with the origin server
CThe second request is served from Cloud CDN cache without contacting the origin
DThe cache is invalidated and content is refreshed before serving the second request
Step-by-Step Solution
Solution:
  1. Step 1: Understand Cache-Control max-age

    The max-age directive specifies how long the response is considered fresh (3600 seconds = 1 hour).
  2. Step 2: Analyze Request Timing

    Since 20 minutes is less than 1 hour, the cached content is still fresh.
  3. Step 3: Cache Behavior

    Cloud CDN serves the cached content directly without contacting the origin server.
  4. Final Answer:

    The second request is served from Cloud CDN cache without contacting the origin -> Option C
  5. Quick Check:

    max-age means content is fresh and served from cache [OK]
Quick Trick: max-age defines freshness; serve from cache if still valid [OK]
Common Mistakes:
  • Assuming cache revalidation happens before max-age expires
  • Thinking cache is bypassed on repeated requests
  • Confusing max-age with no-cache or must-revalidate

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes