How to do caching between the API calls/requests?

Anonymous
2022-07-19T06:39:46.98+00:00

In Azure APIM, how to persist the value between the multiple client calls.
When client request is sent to the Azure API, it check the value required by that API is available and passed it if available, else get the value based on authentication info.

That value should be stored in the subsequent requests until the expiry of that value.

Can we do this kind of caching through Azure APIM Policies?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,769 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sujithreddy Komma 571 Reputation points Microsoft Employee
    2022-07-19T08:45:55.577+00:00

    Hi Vamsi,

    For Multiple Client calls we can sue the Send Request Policy

    to check whether the value is available you cna sue Validate policies based on if its coming in the body Path or Header.

    if you need to parse and check the value you can do that as well and the use Choose Policy and then if its not available you can pick from the authentication.
    To store that value you can use Store Cache Policy for some period of time and the use cache lookup to retrieve it.

    Please use the below documents for reference.

    https://learn.microsoft.com/en-us/azure/api-management/api-management-caching-policies

    https://learn.microsoft.com/en-us/azure/api-management/api-management-advanced-policies

    https://learn.microsoft.com/en-us/azure/api-management/validation-policies

    0 comments No comments

0 additional answers

Sort by: Most helpful