Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace CachingRule

Properties

action

action: Action

The action to take when the criteria of a caching rule are met.

  • CACHE: Caches requested content when the criteria of the rule are met.

  • BYPASS_CACHE: Allows requests to bypass the cache and be directed to the origin when the criteria of the rule is met.

Optional cachingDuration

cachingDuration: undefined | string

The duration to cache content for the caching rule, specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. The maximum value that can be set for any unit is 99. Mixing of multiple units is not supported. Only applies when the action is set to CACHE. Example: PT1H

Optional clientCachingDuration

clientCachingDuration: undefined | string

The duration to cache content in the user's browser, specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. The maximum value that can be set for any unit is 99. Mixing of multiple units is not supported. Only applies when the action is set to CACHE. Example: PT1H

criteria

criteria: Array<CachingRuleCriteria>

The array of the rule criteria with condition and value. The caching rule would be applied for the requests that matched any of the listed conditions.

Optional isClientCachingEnabled

isClientCachingEnabled: undefined | false | true

Enables or disables client caching. Browsers use the Cache-Control header value for caching content locally in the browser. This setting overrides the addition of a Cache-Control header in responses.

Optional key

key: undefined | string

The unique key for the caching rule.

name

name: string

The name of the caching rule.

Functions

getDeserializedJsonObj

getJsonObj