Cache Settings

With Cache Settings for Edge Application, you can edit cache configurations for static and dynamic content.

ScopeResource
Edge Application first stepsFirst steps
Edge Caching moduleEdge Caching
L2 Caching moduleL2 Caching
Creating a cache settingHow to configure cache policies for Edge Application
Configuring Advanced Cache KeyHow to configure Advanced Cache Key for Edge Application

Browser Cache Settings configures the amount of time that content is cached in the user’s browser. You can select from the following options:

  • Honor Origin Cache Headers: honors the cache definitions sent by your origin servers through HTTP headers (Cache-Control and Expires), sending the same headers to the web browser.
  • Override Cache Settings: overrides the cache of your origin server and allows you to set the cache time-to-live (TTL) manually.

CDN Cache Settings configures how Azion caches the content at the edge. You can select from the following options:

  • Honor Origin Cache Headers: maintains the cache definitions sent by your origin servers through HTTP headers (Cache-Control and Expires), sending the same headers to the web browser.
  • Override Cache Settings: overrides the cache setting of your origin server with the desired TTL. To set the TTL of CDN cache to values under 60 seconds, you must enable the Application Acceleration module.

Slice is a feature for Edge Application that processes large amounts of data more effectively, reducing latency and saving bandwidth.

When enabling this functionality, large files are fragmented into smaller ones. These fragments are gradually delivered to the end user according to data consumption, avoiding an abrupt data transfer that could be interrupted by the user. The Slice functionality caches data on demand at the moment the user requests it, initiating the cache operation.

This feature works with a default slice range of 1024kB. If you want to modify the slice-range, contact the Sales team.

Slice can be applied to both the edge caching layer or the L2, provided that L2 Caching is an active module.

Learn more about L2 Caching

You can use Advanced Cache Key to customize cache rules based on the following metadata:

  • Cookies
  • Query strings

At Azion, you define how you want the content to be cached according to Query String variations in your URLs:

  • Content does not vary by Query String (Improves Caching): defines that the cache key must ignore the query string. That is, two URLs that are different just by the variation of the query string will be considered as the same cached object.

    • For example, http://yourdomain.com/path?queryA and http://yourdomain.com/path?queryB will deliver the same cache content to your users.
  • Content varies by some Query String fields (Whitelist): you can list which query string fields should be considered to differentiate between objects in the Azion cache. All other fields will be ignored.

    • For example, if you list the city field, the URLs http://yourdomain.com/path?city=A&name=X and http://yourdomain.com/path?city=A&name=Y will be considered as a single object in cache, while URLs http://yourdomain.com/path?city=A&name=X and http://yourdomain.com/path?city=B&name=X will be considered as different objects.
  • Content varies by Query String, except for some fields (Blocklist): you can list which fields in the query string should be ignored when differentiating cached objects. All other fields will be considered.

    • For example, if you list the random field, the URLs http://yourdomain.com/path?city=A&random=123 and http://yourdomain.com/path?city=B&random=123 will be considered different object in cache, while http://yourdomain.com/path?city=A&random=123 and http://yourdomain.com/path?city=A&random=456 will be considered as the same object in cache.
  • Content varies by all Query String fields: defines that the cache key must consider all fields of the query string. That is, two URLs distinct by the variation of the query string will be considered as two distinct objects in the cache.

    • For example, http://yourdomain.com/path?queryA and http://yourdomain.com/path?queryB will be stored as separate objects in the Azion cache.

In order to increase caching efficiency, you can enable the Query String Sort option. If activated, it orders all the fields of the query string, making the position of the fields irrelevant in the definition of the cache key. If the position of the fields is relevant to differentiate your content, you should disable this option.

You can also distinguish objects in the Azion cache by name/value of cookies.

  • Content does not vary by Cookies (Improves Caching): differentiates objects in Azion’s cache through URL; doesn’t take cookies into account.

  • Content varies by some Cookies (Allowed Rules): you can list the name of the cookies that your application uses to differentiate cached objects. All other cookies will be ignored, allowing you to segment your content by user profiles and other settings. This is the most recommended option if you use cookies to manage user sessions.

  • Content varies by Cookies, with the exception of a few (Blocklist): you can list the name of the cookies you want to ignore in the cache key setting, considering all cookies except those listed.

  • Content varies by all Cookies: in addition to the URL, it considers all cookies to differentiate objects in Azion’s cache.


You can enable the Enable caching for POST switch, allowing Azion to cache POST requests; the Enable caching for OPTIONS key allows Azion to cache OPTIONS requests. These two cache options require the request body to be part of the cache key.


With the Edge Caching module, you can enable Stale Cache to serve stale content when there’s a problem with your origin servers.

When Stale Cache is disabled and the server is unable to update the cache from the origin, the application will return a 500 error to the user and interrupt the session.

Learn more about stale cache

With the Edge Caching module, you can select a device group for Adaptive Delivery.

When choosing the option Content varies by some Device Groups (Whitelist), you’re allowing Azion to keep device-based variations of its objects in cache.

Learn more about Device Groups

Contributors