Is there a way to cache the response received from a http adapter in IBM MobileFirst Platform?
It would be more efficient to get data from cache for frequently used services instead of hitting the service again and again. Even an adapter(server) side caching would reduce response times considerably.
Is there a way to achieve this in IBM MobileFirst?
Best How To :
There is no built-in mechanism to cache an adapter response.
Maybe this will give you a way to do it: use Java in order to "manage" the caching. You'll need to implement the logic to:
- Preserve the data in memory (in variables...)
- Decide when to return the cached data
- Decide when to purge the data and pass the request to the backend
If using Java adapters (starting MobileFirst Platform Foundation 7.0), implement it there...
Perhaps you could also use a CDN, where you'll need to store data and decide in your logic when to reach to the CDN and when not to.