Caching

The X-Cache header provides the caching status of the API response. Understanding the response caching mechanism will enable better integration of Sandbox APIs.

What is Response Caching

To avoid sending multiple requests to the source for the same data, we have implemented a response caching mechanism wherein the response is cached after the first API call for a specified duration. This ensures that data is readily available to the users when required. There will be no wallet charges if you receive a cached response.

X-Cache Header

The response will include a x-cache header, which will provide the status of the Cached response. Here are the possible values

X-Cache Header valuesDescription
Hit from CloudfrontThis a Cached Response
Miss from CloudfrontThis is a fresh response that has now been cached.
Error from CloudfrontWill appear for a non 2XX code, wherein the cache was not hit and the response was not cached.