Bird
0
0

A developer added caching to their REST API but notices stale data is served too long. What is the likely cause?

medium📝 Debug Q14 of 15
Rest API - Caching Strategies
A developer added caching to their REST API but notices stale data is served too long. What is the likely cause?
ACache is disabled in the server
BServer is not processing requests
CCache expiration time is set too high
DClient is not sending requests
Step-by-Step Solution
Solution:
  1. Step 1: Identify stale data cause

    If cached data stays too long, it means the cache expiration or max-age is set too high, so data is not refreshed often.
  2. Step 2: Check other options

    Cache disabled means no caching, so no stale data. Server not processing or client not sending requests would cause no responses, not stale data.
  3. Final Answer:

    Cache expiration time is set too high -> Option C
  4. Quick Check:

    Long cache time = stale data = B [OK]
Quick Trick: Long cache expiration causes stale data [OK]
Common Mistakes:
MISTAKES
  • Assuming cache is off when stale data appears
  • Blaming server or client inactivity
  • Ignoring cache expiration settings

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes