Application Accelerator settings
Look up the fields, values, and defaults that turn on Application Accelerator and set cache variation, HTTP methods, and Rules Engine behaviors.
Application Accelerator is a module of Applications, turned on for one application at a time. The module unlocks the cache fields that vary the cache key, the caching of POST and OPTIONS responses, and seven Rules Engine behaviors. This page carries the name, the type, and the default of each field, and the interface that sets it.
Module activation
The module is off by default, and every interface below sets the same toggle. The toggle belongs to the application, not to a cache setting, so one application can carry it while another does not.
| Interface | Where you set it | Field or flag |
|---|---|---|
| Azion Console | The Modules section of the Main Settings tab of an application | The Application Accelerator switch |
| Azion API v4 | PATCH /workspace/applications/{id} | modules.application_accelerator.enabled |
| Azion CLI | azion update application | --application-accelerator |
azion.config.js | The AzionApplication object | applicationAcceleratorEnabled |
| Azion Lib | The data passed to an application create or update | application_acceleration |
modules.application_accelerator.enabled is a boolean and defaults to false. applicationAcceleratorEnabled and application_acceleration are booleans, and the Azion CLI flag takes a string.
The Azion Terraform provider manages the application resource that carries the module. Turning on a module can generate usage-related costs. For more information, refer to Pricing.
Cache variation
Application Accelerator adds the modules.application_accelerator object to a cache setting, and the fields in it configure Advanced Cache Key. They decide which parts of a request, beyond the URL, produce a separate cached object. In Azion Console, the same fields sit in the Application Accelerator section of a cache setting. A variation appends the @@ separator to the cache key. For the format of a cache key, refer to Cache key format.
| Field | Type | Default | Console control | What it sets |
|---|---|---|---|---|
cache_vary_by_method | array of enum, at most 2 values: options, post | [] | Cache vary by Method, one checkbox per method | The request methods whose responses are cached. |
cache_vary_by_querystring.behavior | enum: ignore, all, allowlist, denylist | ignore | Cache vary by Query String > Behavior | The mode that decides how the query string varies the key. |
cache_vary_by_querystring.fields | array of string | [] | The field list under Cache vary by Query String | The query string arguments the mode applies to. |
cache_vary_by_querystring.sort_enabled | boolean | false | Cache vary by Query String > Sort | Whether the variations group under one key, ordered alphabetically. |
cache_vary_by_cookies.behavior | enum: ignore, all, allowlist, denylist | ignore | Cache vary by Cookies > Behavior | The mode that decides how cookies vary the key. |
cache_vary_by_cookies.cookie_names | array of string | [] | The cookie list under Cache vary by Cookies | The cookies the mode applies to. |
cache_vary_by_devices.behavior | enum: ignore, allowlist | ignore | Cache vary by Devices > Behavior | The mode that decides how device groups vary the key. |
cache_vary_by_devices.device_group | array of integer | [] | The device group list under Cache vary by Devices | The device groups the mode applies to. |
Each Behavior dropdown renders the values of its enum title-cased: Allowlist, Denylist, Ignore, and All.
One field on the same cache setting sits outside that object and is still gated by the module:
| Field | Type | Default | Console control | What it sets |
|---|---|---|---|---|
modules.cache.max_age | integer, 0 to 31536000 seconds | 60 | Cache > Max Age | How long the cache holds the object. A value below 60 requires the module. |
For the ceilings that bound a cache setting, refer to Limits.
Cache setting flags in Azion CLI
azion create cache-setting writes the same fields from the command line. Each flag below sets one field of the cache setting.
| Flag | Field it sets | Default |
|---|---|---|
--cache-by-query-string | cache_vary_by_querystring.behavior | ignore |
--query-string-fields | cache_vary_by_querystring.fields | None |
--cache-by-cookies | cache_vary_by_cookies.behavior | ignore |
--cookie-names | cache_vary_by_cookies.cookie_names | None |
--enable-caching-for-post | post in cache_vary_by_method | None |
--enable-caching-for-options | options in cache_vary_by_method | false |
Azion CLI does not set device-group variation, and it does not set the maximum age of the cache: --browser-cache-max-age sets the browser value alone.
HTTP methods
An application natively accepts GET and HEAD. Application Accelerator adds five more methods, and the responses of two of them can be cached through cache_vary_by_method.
| Method added by the module | Response can be cached |
|---|---|
OPTIONS | Yes, when cache_vary_by_method carries options |
POST | Yes, when cache_vary_by_method carries post |
PUT | No |
PATCH | No |
DELETE | No |
A cached POST or OPTIONS object gets its own cache key. For the shape of that key, refer to Cached HTTP methods.
Rules Engine behaviors
Seven Rules Engine behaviors require Application Accelerator on the application that runs the rule. The table indexes them; Rules Engine owns the arguments and the syntax of each one.
| Behavior | Phases | What it does |
|---|---|---|
| Add Cookie | Request, Response | Adds a cookie to the Set-Cookie header. |
| Bypass Cache | Request | Stops Azion from caching the origin response, and leaves the browser cache untouched. |
| Capture Match Groups | Request, Response | Stores the result of a regular expression capture over a request field in a temporary variable. |
| Filter Cookie | Request, Response | Removes a cookie from the request header sent to the origin, or from the response header sent to the user. |
| Forward Cookies | Request | Forwards the Set-Cookie header of the origin to users, including on a cache hit. |
| Rewrite Request | Request | Modifies the resource path requested from the origin. |
| Run Function | Request, Response | Runs a function instantiated on the application. Also requires Functions. |
Rule criteria can read ${device_group}, which requires the module as well. For the variable, refer to Variables, and for the groups it matches, refer to Device Groups.
Set Cache Policy does not require the module. It assigns a cache policy created in Cache Settings, and it is how a cache setting reaches a request.