Bird
0
0

Which of the following is the correct way to manually invalidate a cache entry in a REST API?

easy📝 Syntax Q12 of 15
Rest API - Caching Strategies
Which of the following is the correct way to manually invalidate a cache entry in a REST API?
ASend a PUT request to update cached data
BSend a GET request to the cache endpoint
CSend a POST request to retrieve cached data
DSend a DELETE request to the cache endpoint
Step-by-Step Solution
Solution:
  1. Step 1: Identify HTTP method for deletion

    DELETE requests are used to remove resources, including cache entries.
  2. Step 2: Understand other methods

    GET retrieves data, POST creates, and PUT updates; none remove cache.
  3. Final Answer:

    Send a DELETE request to the cache endpoint -> Option D
  4. Quick Check:

    DELETE removes cache entry manually [OK]
Quick Trick: DELETE method removes resources like cache entries [OK]
Common Mistakes:
MISTAKES
  • Using GET to remove cache
  • Confusing POST with deletion
  • Thinking PUT deletes cache

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes