Nova has a high performance in-memory object cache to accelerate and offload your web servers. This is available on HTTP or SSL enabled ADCs only.
Small object caching allows you to offload the static content from your application servers. They can then better perform their primary duty - delivering the application.
By default, Nova allows a total of 128MB of objects to be cached in memory, and expires stale objects after 240 seconds (4 minutes). The maximum cacheable object size is 256KB.
Nova caching has several restrictions on when it will decide to cache and serve an object. These are listed below.
|Size||The object must be under 10mb|
|HTTP Status||The HTTP status for the request must be a 200 code|
|Content Length||The response must have a Content-Length header|
|Cacheable||The response must not have a Cache-Control: no-cache header|
|Method||The request must be an HTTP GET|
|HTTP Version||Must be 1.1 or higher|
|Authorization||The request must not have an authorization header|
|Expiration||The response must have an expiration header (s-maxage or max-age Cache-Control directives or Expires header)|
Cached objects in Nova are able to be returned at an extremely high rate, often allowing hundreds of thousands of requests a second in real time. Configuring your API or application to benefit from this ability can be extremely powerful.
With standard websites you typically get this for free - the site will say what can be cached and what cannot. However, with APIs it benefits you to instruct Nova to cache certain responses.
For example, you may have an API that returns stock prices publicly. Let unauthenticated GETs be cached for a massive performance increase.
Nova does support caching Vary responses, but only allows a maximum of 5 variations of a given response.
You will get an
X-Cache-Status header on responses from Nova for any ADCs that have caching enabled. This will be either a hit or miss as shown below:
x-cache-status: HIT x-cache-status: MISS
These are standard headers to include to allow for debugging/testing and to allow clients to tell the freshness of an object. If they request the object with caching disabled (by sending no cache headers) it will always miss.