Caching

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.

Overview

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.

It's important to know that this is designed for high performance small object caching, not to store large infrequently used files. Typically, what you want to see in production is that your stylesheets, javascript, images, and the like can be served directly from Nova.

Restrictions

Nova caching has several restrictions on when it will decide to cache and serve an object. These are listed below.

NameDescription
SizeThe object must be under 10mb
HTTP StatusThe HTTP status for the request must be a 200 code
Content LengthThe response must have a Content-Length header
CacheableThe response must not have a Cache-Control: no-cache header
MethodThe request must be an HTTP GET
HTTP VersionMust be 1.1 or higher
AuthorizationThe request must not have an authorization header
ExpirationThe response must have an expiration header (s-maxage or max-age Cache-Control directives or Expires header)

Using Caching

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.

Vary Caching

Nova does support caching Vary responses, but only allows a maximum of 5 variations of a given response.

Headers

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.