Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

On this page

...

Table of Contents
minLevel1
maxLevel3
outlinefalse
typelist
printablefalse

The HTTP Response Cache policy adds the capability for API Proxies to cache reoccurring and/or static HTTP responses to manage latency, decrease response times, and reduce load on a proxied server. By default, cached HTTP responses are stored based on the proxy's URL and request method. Additionally, you can configure cache responses for specified request header keys and query string keys. Following policy configuration, cached responses are returned to HTTP clients instead of requesting resources from the proxied server.

Use this policy for highly reoccurring and static responses to manage latency and response times, which can reduce the load on the upstream API as well as the proxy server. An incoming HTTP request to one of your Proxy endpoints returns the cached response that’s stored for a specified time period. The policy owner can configure the cache time-to-live (TTL) per policy and the cache key used to cache each request (with every key-value pair).

...

This policy runs after every request and response policy.

Known

...

Issues

Both the HTTP Cache Response and HTTP Retry Policies fail to evaluate expressions. As a result, the When this policy should be applied field should not be set. Doing so can cause issues with the way the policy is applied.

...

Each Snaplex node has its own cache, so the cache for an incoming request might miss be missed on each node until properly distributed and hydrated on each node.

...

Usage Guidelines

  • We limit each policy to have store 100 entries in the cache per policy. Accordingly, the policy evicts the least used entry after 100.

  • Expired caches cannot be accessed, and new entries overwrite any existing ones. The maximum quantity of bytes that an HTTP response caches in the default configuration is 85.83 MB of the payload.

...