Azion CLI cache settings command and its subcommands

See the command and subcommands that enable the management of your Cache Settings used on the Azion Platform using Azion CLI.


List the cache settings configured in an edge application.

Terminal window
azioncli cache-settings --application-id 12738

The --application-id flag gives the ID for the edge application and, based on that, the cache settings related to the application are listed.

The --details option displays all relevant fields when listing.

The --filter option filters items by name.

The --order_by option sorts the output based on the informed field.

The --page option returns a page of the list based on the selected field.

The --page_size option defines how many items should be returned per page. By default, it’s 10.

The --sort option defines the order of the items on the list. The value should be either asc or desc.

The --help option displays more information about the list subcommand.


Create a Cache Settings configuration based on given attributes to be used with edge applications.

Terminal window
azioncli cache_settings create --name cachesettingsname --application-id 00000000001

The --name flag gives the Cache Settings configuration name.

The --application-id flag gives the ID for the edge application related to this Cache Settings configuration.

The --help option displays more information about the create subcommand.

The --adaptive-delivery-action option informs the Cache Settings configuration adaptive delivery action. By default, it’s set as ignore.

The --browser-cache-settings option configures the amount of time the content is cached in the web browser.

browser-cache-settings-maximum-ttl

Section titled browser-cache-settings-maximum-ttl

The --browser-cache-settings-maximum-ttl option informs the browser Cache Settings configuration maximum TTL.

The --cache-by-cookies option defines whether cache by cookies is active or not. By default, it’s ignore.

The --cache-by-query-string option defines how you want the content to be cached according to variations of Query String in your URLs. By default, it’s ignore.

The --cdn-cache-settings option configures the amount of time Azion’s edge applications take to cache the content. It can either Honor Origin Cache Headers or Override Cache Settings. By default, it’s honor.

cdn-cache-settings-maximum-ttl

Section titled cdn-cache-settings-maximum-ttl

The --cdn-cache-settings-maximum-ttl option informs CDN Cache Settings configuration maximum TTL. By default, it’s 60.

The --cookie-names option distinguishes objects in the Azion cache by name/value of cookies.

The --enable-caching-for-options option informs whether caching for options is active or not. By default, it’s false.

The --enable-caching-for-post option informs whether caching for post is active or not.

The --enable-caching-string-sort option informs whether caching string sort is active or not.

The --in option informs the file path to a JSON file containing all attributes of the Cache Settings configuration that will be created.

Note: if the --in and --application-id flags are given, all information will be accessed through the filepath that was passed through the flag, so the other flags aren’t necessary.

The --l2-caching-enabled option informs whether L2 caching is active or not.

The --query-string-fields option gives a list of query strings parameters to be considered in the Cache Settings configuration that will segregate the cache to the same URL.

The --slice-configuration-enabled option informs whether slice configuration is active or not.

The --slice-configuration-range option gives the slice configuration range.

The --slice-l2-caching-enabled option informs whether slice L2 configuration is active or not.


Update a cache settings configuration based on the ID informed and given attributes.

Terminal window
azioncli cache_settings update --application-id 1673635839312 --cache-settings-id 115241237 --name "cachesettingstest"

The --application-id flag informs the ID of the edge application related to the Cache Settings configuration.

The --cache-settings-id flag informs the unique identifier for a Cache Settings configuration.

The --help option displays more information about the update subcommand.

The --name flag gives the Cache Settings configuration name.

The --adaptive-delivery-action option informs the Cache Settings configuration adaptive delivery action. By default, it’s set as ignore.

The --browser-cache-settings option configures the amount of time the content is cached in the web browser.

browser-cache-settings-maximum-ttl

Section titled browser-cache-settings-maximum-ttl

The --browser-cache-settings-maximum-ttl option informs the browser Cache Settings configuration maximum TTL.

The --cache-by-cookies option defines whether cache by cookies is active or not. By default, it’s ignore.

The --cache-by-query-string option defines how you want the content to be cached according to variations of Query String in your URLs. By default, it’s ignore.

The --cdn-cache-settings option configures the amount of time Azion’s edge applications take to cache the content. It can either Honor Origin Cache Headers or Override Cache Settings. By default, it’s honor.

cdn-cache-settings-maximum-ttl

Section titled cdn-cache-settings-maximum-ttl

The cdn-cache-settings-maximum-ttl option informs CDN Cache Settings configuration maximum TTL. By default, it’s 60.

The --cookie-names option distinguishes objects in the Azion cache by name/value of cookies.

The --enable-caching-for-options option informs whether caching for options is active or not. By default, it’s false.

The --enable-caching-for-post option informs whether caching for post is active or not.

The --enable-caching-string-sort option informs whether caching string sort is active or not.

The --in option informs the file path to a JSON file containing all attributes of the Cache Settings configuration that will be updated.

Note: if the --in and --application-id flags are given, all information will be accessed through the filepath that was passed through the flag, so the other flags aren’t necessary.

The --l2-caching-enabled option informs whether L2 caching is active or not.

The --query-string-fields option gives a list of query strings parameters to be considered in the Cache Settings configuration that will segregate the cache to the same URL.

The --slice-configuration-enabled option informs whether slice configuration is active or not.

The --slice-configuration-range option gives the slice configuration range.

The --slice-l2-caching-enabled option informs whether slice L2 configuration is active or not.


Describing a cache settings configuration

Section titled Describing a cache settings configuration

Return details about a specific Cache Settings configuration, based on a given ID.

Terminal window
azioncli cache_settings describe --application-id 1673635839 --cache-settings-id 107313

The --application-id flag informs the ID of the edge application related to the Cache Settings configuration that will be described.

The --cache-settings-id flag informs the unique identifier for a Cache Settings configuration.

The --out option exports the output of the describe command to a given filepath.

The --format option, followed by the value json, changes the output format to JSON.

The --help option displays more information about the describe subcommand.


Deleting a cache settings configuration

Section titled Deleting a cache settings configuration

Delete a Cache Settings configuration on the Azion platform.

Terminal window
azioncli cache_settings delete --application-id 0000092 --cache-settings-id 0029

The --application-id flag informs the ID of the edge application related to the Cache Settings configuration that will be deleted.

The --cache-settings-id flag informs the unique identifier for a Cache Settings configuration.

The --help option displays more information about the delete subcommand.