API Manager Guide > API-specific policies > API-specific response caching policy
  

API-specific response caching policy

You can configure a response caching policy for a managed API or custom API. The response caching policy defines how long API Manager stores API responses in a cache repository.
When response caching is enabled for an API, API Manager saves responses to invocations of the API in the cache repository. Responses differ based on the input parameters that the API consumer sends to the API during invocation. When API consumers invoke the API, API Manager attempts to use saved responses in order to reduce time and resources. If a matching response is found in the cache, API Manager returns the response from the cache instead of calling the Cloud Application Integration process.
API Manager supports node-wise response caching. For example, assume that when an API consumer invokes an API that uses response caching, the call is processed by node A. If the subsequent invocation of the API is also processed by node A, API Manager returns the response from the cache. If the subsequent invocation is processed by a different node, say, node B, API Manager calls the Cloud Application Integration process again and saves the response in the cache of node B.
API Manager deletes responses from the cache after the defined timeout. When you disable the response caching policy for an API, API Manager deletes responses from the cache for the API.
Before you configure a response caching policy for an API, note the following considerations:

Configuring an API-specific response caching policy

Configure a response caching policy for a managed API or custom API on the Policies tab of the API details window to define how long API Manager stores API responses in the cache.
    1On the API Registry page, click to open the Actions menu of the API and select View Details.
    The API details window appears.
    2Select the Policies tab.
    3In the Response Caching section, select Enable Response Caching.
    4In Cache Timeout, enter a value between 1 and 3600, and then click Save.
    To disable the response caching policy for the API, clear the option Enable Response Caching, and then click Save.