Bird
0
0

If a server sends this header:

medium📝 Predict Output Q5 of 15
Rest API - Caching Strategies
If a server sends this header:
Cache-Control: max-age=60, must-revalidate
What does the must-revalidate directive enforce?
AThe client must revalidate the cached response with the server after expiration before using it
BThe client can use stale cache indefinitely without contacting the server
CThe cache will never expire
DThe client must ignore the cache and always fetch fresh data
Step-by-Step Solution
Solution:
  1. Step 1: Understand must-revalidate directive

    must-revalidate forces client to check with server after cache expires before reuse.
  2. Step 2: Compare options with this behavior

    Only The client must revalidate the cached response with the server after expiration before using it correctly describes this behavior.
  3. Final Answer:

    The client must revalidate the cached response with the server after expiration before using it -> Option A
  4. Quick Check:

    must-revalidate = revalidate after expiration [OK]
Quick Trick: must-revalidate forces server check after cache expires [OK]
Common Mistakes:
MISTAKES
  • Thinking must-revalidate allows indefinite stale cache use
  • Confusing must-revalidate with no-cache

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes