---
title: "Create an Applications Cache Setting"
method: POST
path: "/workspace/applications/{application_id}/cache_settings"
tags: ["Applications - Cache Settings"]
---

# Create an Applications Cache Setting

`POST /workspace/applications/{application_id}/cache_settings`

Create a new Cache Setting in your account.

## Path parameters

- `application_id` integer, required

## Request body

- CacheSettingRequest
  - `name` string, required
  - `browser_cache` BrowserCacheModuleRequest
    - `behavior` 'override' | 'honor' | 'no-cache' — * `override` - override * `honor` - honor * `no-cache` - no-cache
    - `max_age` integer
  - `modules` CacheSettingsModulesRequest
    - `cache` CacheSettingsCacheModuleRequest
      - `behavior` 'honor' | 'override' — * `honor` - Honor Origin Cache Settings * `override` - Override Cache Settings
      - `max_age` integer — To use a value lower than 60s, the Application Acceleration module must be enabled on the Application.
      - `stale_cache` StateCacheModuleRequest
        - `enabled` boolean
      - `large_file_cache` LargeFileCacheModuleRequest
        - `enabled` boolean
        - `offset` integer
      - `tiered_cache` CacheSettingsTieredCacheModuleRequest
        - `topology` 'nearest-region' | 'br-east-1' | 'us-east-1' — * `nearest-region` - nearest-region * `br-east-1` - br-east-1 * `us-east-1` - us-east-1
        - `enabled` boolean
    - `application_accelerator` CacheSettingsApplicationAcceleratorModuleRequest
      - `cache_vary_by_method` CacheVaryByMethodEnum[]
      - `cache_vary_by_querystring` CacheVaryByQuerystringModuleRequest
        - `behavior` 'ignore' | 'all' | 'allowlist' | 'denylist' — * `ignore` - ignore * `all` - all * `allowlist` - allowlist * `denylist` - denylist
        - `fields` string[]
        - `sort_enabled` boolean
      - `cache_vary_by_cookies` CacheVaryByCookiesModuleRequest
        - `behavior` 'ignore' | 'all' | 'allowlist' | 'denylist' — * `ignore` - ignore * `all` - all * `allowlist` - allowlist * `denylist` - denylist
        - `cookie_names` string[]
      - `cache_vary_by_devices` CacheVaryByDevicesModuleRequest
        - `behavior` 'ignore' | 'allowlist' — * `ignore` - ignore * `allowlist` - allowlist
        - `device_group` integer[]

## Response `201`

Cache setting created successfully.

- CacheSettingResponse
  - `state` string
  - `data` CacheSetting, required
    - `id` integer, required
    - `name` string, required
    - `browser_cache` BrowserCacheModule
      - `behavior` 'override' | 'honor' | 'no-cache' — * `override` - override * `honor` - honor * `no-cache` - no-cache
      - `max_age` integer
    - `modules` CacheSettingsModules
      - `cache` CacheSettingsCacheModule
        - `behavior` 'honor' | 'override' — * `honor` - Honor Origin Cache Settings * `override` - Override Cache Settings
        - `max_age` integer — To use a value lower than 60s, the Application Acceleration module must be enabled on the Application.
        - `stale_cache` StateCacheModule
          - `enabled` boolean
        - `large_file_cache` LargeFileCacheModule
          - `enabled` boolean
          - `offset` integer
        - `tiered_cache` CacheSettingsTieredCacheModule
          - `topology` 'nearest-region' | 'br-east-1' | 'us-east-1' — * `nearest-region` - nearest-region * `br-east-1` - br-east-1 * `us-east-1` - us-east-1
          - `enabled` boolean
      - `application_accelerator` CacheSettingsApplicationAcceleratorModule
        - `cache_vary_by_method` CacheVaryByMethodEnum[]
        - `cache_vary_by_querystring` CacheVaryByQuerystringModule
          - `behavior` 'ignore' | 'all' | 'allowlist' | 'denylist' — * `ignore` - ignore * `all` - all * `allowlist` - allowlist * `denylist` - denylist
          - `fields` string[]
          - `sort_enabled` boolean
        - `cache_vary_by_cookies` CacheVaryByCookiesModule
          - `behavior` 'ignore' | 'all' | 'allowlist' | 'denylist' — * `ignore` - ignore * `all` - all * `allowlist` - allowlist * `denylist` - denylist
          - `cookie_names` string[]
        - `cache_vary_by_devices` CacheVaryByDevicesModule
          - `behavior` 'ignore' | 'allowlist' — * `ignore` - ignore * `allowlist` - allowlist
          - `device_group` integer[]
    - `created_at` string, date-time, nullable, required

## Other responses

- `400` — Validation Error
- `401` — Authentication Failed
- `403` — Permission Denied
- `404` — Not Found
- `405` — Method Not Allowed
- `406` — Not Acceptable
- `429` — Throttled
- `500` — Internal Server Error

---

[API](https://skmtc.dev/azion/apis/azion-api.md) · [All operations](https://skmtc.dev/azion/apis/azion-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azion/azion-api/revisions/bb3250697218/schema)
