
Use this policy when you want to use cacheddata to be sent in response instead of the request going to backend API. This should be used for the data that does not change frequently.
Some API responses send data that does notchange frequently and the same data is sent for multiple requests. When the cache isnot used, the requests go to the backend API and the processing is done to get theresponse. This takes longer to send response and increase processing load on thebackend API unnecessarily.
This type of data can be stored in cache andsent in the response without sending the request to the backend API. Doing soimproves the response times and saves on the resources for backend API.
Cache Response policy can be used to dothis.
When this policy is configured in the flow,the cache is looked up based on the cache key input field for any request that isreceived. If the data is not found in cache, which will be the case for the firstrequest, then the backend API is called and the response data is stored in cache.For any further requests with same key the data will be taken from the cache andsent in response till the time cache entry is valid (not expired).
The configuration fields for the policyare:
[* Indicates a mandatory field]
Name *:
Description:
Enabled:
Continue on Error:
Cache Key:
Expiry Date
Expiry Time
TTL in seconds
Lookup Timeout in seconds:
Skip Cache Lookup:
Skip Cache Population:
cacheKey: Key based on which cache lookup isdone. This value overrides the value in configuration field “Cache Key”
status: returns boolean true if the data is found incache, otherwise returns false
Cache value: value found in cache
Contact