1 of 20
2 of 20
3 of 20
4 of 20
5 of 20
6 of 20
7 of 20
8 of 20
9 of 20
10 of 20
11 of 20
12 of 20
13 of 20
14 of 20
15 of 20
16 of 20
17 of 20
18 of 20
19 of 20
20 of 20

doc

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.

  1. Listing your cache settings
  2. Creating an cache settings
  3. Updating cache settings
  4. Describing a cache settings configuration
  5. Deleting a cache settings configuration

1. Listing your cache settings

List the cache settings configured in an edge application.

Usage

    $ azioncli cache-settings --application-id 12738

Required flags

application-id

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

Optional flags

details

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

filter

The --filter option filters items by name.

order_by

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

page

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

page_size

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

sort

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

help

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


2. Creating cache settings

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

Usage

    $ azioncli cache_settings create --name cachesettingsname --application-id 00000000001

Required flags

name

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

application-id

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

Optional flags

help

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

adaptive-delivery-action

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

browser-cache-settings

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

browser-cache-settings-maximum-ttl

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

cache-by-cookies

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

cache-by-query-string

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.

cdn-cache-settings

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

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.

enable-caching-for-options

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

enable-caching-for-post

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

enable-caching-string-sort

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

in

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.

l2-caching-enabled

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

query-string-fields

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.

slice-configuration-enabled

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

slice-configuration-range

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

slice-l2-caching-enabled

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


3. Updating cache settings

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

Usage

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

Required flags

application-id

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

cache-settings-id

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

Optional flags

help

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

name

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

adaptive-delivery-action

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

browser-cache-settings

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

browser-cache-settings-maximum-ttl

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

cache-by-cookies

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

cache-by-query-string

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.

cdn-cache-settings

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

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.

enable-caching-for-options

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

enable-caching-for-post

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

enable-caching-string-sort

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

in

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.

l2-caching-enabled

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

query-string-fields

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.

slice-configuration-enabled

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

slice-configuration-range

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

slice-l2-caching-enabled

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


4. Describing a cache settings configuration

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

Usage

    $ azioncli cache_settings describe --application-id 1673635839 --cache-settings-id 107313

Required flags

application-id

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

cache-settings-id

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

Optional flags

out

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

format

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

help

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


5. Deleting a cache settings configuration

Deletes a Cache Settings configuration on the Azion platform.

Usage

    $ azioncli cache_settings delete --application-id 0000092 --cache-settings-id 0029

Required flags

application-id

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

cache-settings-id

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

Optional flags

help

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



Didn’t find what you were looking for? Open a support ticket.