Developing Applications Using Cisco Core Platforms and APIs (DEVCOR) — Question 341
A developer deployed a web application in a local data center that is experiencing high traffic load from users that access data through REST API calls. Caching helps to enhance the responsiveness and performance of the API usage. Which approach must be used to improve cache performance?
Answer options
- A. Ensure that all read requests are clearly identified by the PUT method.
- B. Implement surrogate key tagging to purge requests.
- C. Use HTTP POST or other non-read methods for read requests when it is possible.
- D. Configure the API payload to return errors in HTTP 200 responses.
Correct answer: B
Explanation
The correct answer is B because implementing surrogate key tagging allows for effective cache management, enabling specific requests to be purged when necessary. Option A is incorrect as the PUT method is not intended for read requests, and option C is also wrong since using POST for read requests can lead to unexpected behavior. Option D is misleading since returning errors as HTTP 200 responses violates the standard HTTP response codes.