Cache API response of service provider based on the request

Hello everyone!

Just want to know the possible ways to implement caching for API calls. I want to cache the response payload of the service provider so that when an identical requests comes in, it will lookup the cache and if it matches, it will return the cached response. If not, it will proceed with the API call going to the service provider.

Regards,

Ryan

Solved Solved
0 5 189
1 ACCEPTED SOLUTION

5 REPLIES 5

Apologies, did not see that there was an existing policy for this use case. Thank you!

no problem, And you're welcome.  

If you don't mind my asking, how did you come to learn about Apigee? Could there be a better way to allow people like you to get ramped up on Apigee? What did we miss, that you didn't know about the policy? Could we have made it easier to find in some way? 

Hello,

I'm using Apigee in my full-time job. Currently, we're not implementing caching for transaction responses although we use it extensively for caching accessTokens and credentials. I think you did not miss anything, it's a miss on my part since I really like the documentation of your policies and flow variables. One thing that I've been looking for in Apigee is the documentation on the values of error.state. This would be really helpful for custom error handling.

Thank you!

I'm glad you think the documentation is solid, I'll pass that on to the writers !

I'll look into the docs on error.state.