CachingRule

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

Bases: object

CachingRule model.

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 on matched caching rules. - CACHE: Allow to set caching rule, which would be cached.

  • BYPASS_CACHE: Allow to set caching rule, which would never be cached. e.g. all requests would be passed directly to origin for those file types.

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 caching duration (applies only to CACHE action) specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported.

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

Gets the client_caching_duration of this CachingRule. The client caching duration (applies only to CACHE action) specified in ISO 8601 extended format, in case client caching enabled. It sets Cache-Control header max-age time, i.e. the local browser cache expire time. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported.

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.

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 the client caching. Browsers use the Cache-Control header value for caching content locally, in the browser. This setting will control the addition of a Cache-Control header to responses. It overrides existing Cache-Control headers.

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