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 values | Description |
---|---|
Hit from Cloudfront | This a Cached Response |
Miss from Cloudfront | This is a fresh response that has now been cached. |
Error from Cloudfront | Will appear for a non 2XX code, wherein the cache was not hit and the response was not cached. |
Updated 4 months ago