Show / Hide Table of Contents

Class CachingRule

Inheritance
object
CachingRule
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.WaasService.Models
Assembly: OCI.DotNetSDK.Waas.dll
Syntax
public class CachingRule

Properties

Action

Declaration
[Required(ErrorMessage = "Action is required.")]
[JsonProperty(PropertyName = "action")]
[JsonConverter(typeof(ResponseEnumConverter))]
public CachingRule.ActionEnum? Action { get; set; }
Property Value
Type Description
CachingRule.ActionEnum?

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.
Remarks

Required

CachingDuration

Declaration
[JsonProperty(PropertyName = "cachingDuration")]
public string CachingDuration { get; set; }
Property Value
Type Description
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

ClientCachingDuration

Declaration
[JsonProperty(PropertyName = "clientCachingDuration")]
public string ClientCachingDuration { get; set; }
Property Value
Type Description
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

Declaration
[Required(ErrorMessage = "Criteria is required.")]
[JsonProperty(PropertyName = "criteria")]
public List<CachingRuleCriteria> Criteria { get; set; }
Property Value
Type Description
List<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.

Remarks

Required

IsClientCachingEnabled

Declaration
[JsonProperty(PropertyName = "isClientCachingEnabled")]
public bool? IsClientCachingEnabled { get; set; }
Property Value
Type Description
bool?

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.

Key

Declaration
[JsonProperty(PropertyName = "key")]
public string Key { get; set; }
Property Value
Type Description
string

The unique key for the caching rule.

Name

Declaration
[Required(ErrorMessage = "Name is required.")]
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
Property Value
Type Description
string

The name of the caching rule.

Remarks

Required

In this article
Back to top