Bird
0
0

If a server sends this header:

medium📝 Predict Output Q5 of 15
Rest API - Request and Response Format
If a server sends this header:
Cache-Control: no-cache

What does it instruct the client to do?
ACache the response but revalidate before use
BNever cache the response
CCache the response and use without revalidation
DCache the response only on public networks
Step-by-Step Solution
Solution:
  1. Step 1: Understand no-cache directive

    'no-cache' means the client can store the response but must check with the server before using it.
  2. Step 2: Compare with other options

    It does not prevent caching entirely (that's no-store), nor does it allow use without revalidation.
  3. Final Answer:

    Cache the response but revalidate before use -> Option A
  4. Quick Check:

    no-cache = Cache with revalidation [OK]
Quick Trick: no-cache means cache but always revalidate first [OK]
Common Mistakes:
  • Thinking no-cache disables caching completely
  • Confusing no-cache with no-store
  • Assuming no-cache allows using cached data without checks

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes