Parameter | Description |
Cache Criteria. Specifies the criteria that API Gateway uses to determine the request component, that is, the actual payload based on which the results of the API invocation are cached. | |
HTTP Header | Uses the HTTP header in the API request. You can use this criterion for APIs that accept payloads only in HTTP format. The Service Result Caching policy is applicable only for the HTTP GET operation; and not for other HTTP methods. Header Name. Specifies the HTTP header name. Cache responses only for these values. API Gateway caches the API responses only for requests whose cache criteria match with those set for the action, and whose criteria evaluation results in any one of the values in this list. You can add multiple entries by clicking . Note: If this field is empty, all the values that satisfy the criterion are cached. |
Query Parameters | You can use this criterion for REST-based API requests. Specifies the names and values of the query parameters to filter the incoming requests and cache the results based on the names and values specified. Parameter Name. Specifies the parameter name. Cache responses only for these values. API Gateway caches the API responses only for requests whose cache criteria match those set for the action, and whose criteria evaluation results in any one of the values in this list. You can add multiple entries by clicking . |
XPath | You can use this criterion for SOAP-based API requests whose payload is a SOAP envelope. Uses the XPath expression in the API request. Name Space. Specifies the namespace of the XPath expression. Prefix. Specifies the prefix for the namespace. URI. Specifies the namespace URI. You can add multiple entries by clicking . XPath Expression. Specifies the XPath expression in the API request. Cache responses only for these values. API Gateway caches the API responses only for requests whose cache criteria match those set for the action, and whose criteria evaluation results in any one of the values in this list. You can add multiple entries by clicking . Note: If this field is empty, all the values that satisfy the criteria are cached. |
Time to Live (e.g., 5d 4h 1m) | Specifies the lifespan of the elements in the cache after which the elements are considered to be out-of-date. The time is specified in terms of days, hours, and minutes; for example, 5d 4h 1m. The default time format is minutes if the input is a number. |
Maximum Response Payload Size (in KB, -1=unlimited) | Specifies the maximum payload size for the API in kilo bytes. The value -1 stands for unlimited payload size. |
Cache criteria | HTTP Header | Query parameters | XPATH | Values |
C1 | Header1 | h1, h2 | ||
C2 | Header2 | |||
C3 | query1 | q1, q2 |