CachingRule

class oci.waas.models.CachingRule(**kwargs)

Bases: object

CachingRule model.

Attributes

ACTION_BYPASS_CACHE A constant which can be used with the action property of a CachingRule.
ACTION_CACHE A constant which can be used with the action property of a CachingRule.
action [Required] Gets the action of this CachingRule.
caching_duration Gets the caching_duration of this CachingRule.
client_caching_duration Gets the client_caching_duration of this CachingRule.
criteria [Required] Gets the criteria of this CachingRule.
is_client_caching_enabled Gets the is_client_caching_enabled of this CachingRule.
key Gets the key of this CachingRule.
name [Required] Gets the name of this CachingRule.

Methods

__init__(**kwargs) Initializes a new CachingRule object with values from keyword arguments.
ACTION_BYPASS_CACHE = 'BYPASS_CACHE'

A constant which can be used with the action property of a CachingRule. This constant has a value of “BYPASS_CACHE”

ACTION_CACHE = 'CACHE'

A constant which can be used with the action property of a CachingRule. This constant has a value of “CACHE”

__init__(**kwargs)

Initializes a new CachingRule object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • key (str) – The value to assign to the key property of this CachingRule.
  • name (str) – The value to assign to the name property of this CachingRule.
  • action (str) – The value to assign to the action property of this CachingRule. Allowed values for this property are: “CACHE”, “BYPASS_CACHE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • caching_duration (str) – The value to assign to the caching_duration property of this CachingRule.
  • is_client_caching_enabled (bool) – The value to assign to the is_client_caching_enabled property of this CachingRule.
  • client_caching_duration (str) – The value to assign to the client_caching_duration property of this CachingRule.
  • criteria (list[CachingRuleCriteria]) – The value to assign to the criteria property of this CachingRule.
action

[Required] Gets the action of this CachingRule. 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.

Allowed values for this property are: “CACHE”, “BYPASS_CACHE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The action of this CachingRule.
Return type:str
caching_duration

Gets the caching_duration of this CachingRule. 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

Returns:The caching_duration of this CachingRule.
Return type:str
client_caching_duration

Gets the client_caching_duration of this CachingRule. 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

Returns:The client_caching_duration of this CachingRule.
Return type:str
criteria

[Required] Gets the criteria of this CachingRule. 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.

Returns:The criteria of this CachingRule.
Return type:list[CachingRuleCriteria]
is_client_caching_enabled

Gets the is_client_caching_enabled of this CachingRule. 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.

Returns:The is_client_caching_enabled of this CachingRule.
Return type:bool
key

Gets the key of this CachingRule. The unique key for the caching rule.

Returns:The key of this CachingRule.
Return type:str
name

[Required] Gets the name of this CachingRule. The name of the caching rule.

Returns:The name of this CachingRule.
Return type:str