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 | Specifies the header name and values to look for in the HTTP header of incoming API requests to filter the requests and cache the results based on the header names and values specified. You can use this criterion for APIs that accept payloads only in HTTP format. 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 you do not specify any values, all the API requests containing the specified header name 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. Specifies the XPath expression details and values to look in the HTTP header of an incoming API request to filter the requests and cache the results based on the criteria specified. 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 you do not specify any values, all the API requests containing the specified XPath expression 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. If you do not specify any value, the Time to Live is considered to be unlimited (does not expire). If you set the value to 0d 0h 0m, the API results are not cached. The default time format is minutes if the input is a number. |
Maximum Response Payload Size (in KB) | 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 |