Language

ArmCdnModelFactory.CacheConfiguration Method

Definition

Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object.

public static Azure.ResourceManager.Cdn.Models.CacheConfiguration CacheConfiguration(Azure.ResourceManager.Cdn.Models.RuleQueryStringCachingBehavior? queryStringCachingBehavior = default, string queryParameters = default, Azure.ResourceManager.Cdn.Models.RuleIsCompressionEnabled? isCompressionEnabled = default, Azure.ResourceManager.Cdn.Models.RuleCacheBehavior? cacheBehavior = default, TimeSpan? cacheDuration = default);
static member CacheConfiguration : Nullable<Azure.ResourceManager.Cdn.Models.RuleQueryStringCachingBehavior> * string * Nullable<Azure.ResourceManager.Cdn.Models.RuleIsCompressionEnabled> * Nullable<Azure.ResourceManager.Cdn.Models.RuleCacheBehavior> * Nullable<TimeSpan> -> Azure.ResourceManager.Cdn.Models.CacheConfiguration
Public Shared Function CacheConfiguration (Optional queryStringCachingBehavior As Nullable(Of RuleQueryStringCachingBehavior) = Nothing, Optional queryParameters As String = Nothing, Optional isCompressionEnabled As Nullable(Of RuleIsCompressionEnabled) = Nothing, Optional cacheBehavior As Nullable(Of RuleCacheBehavior) = Nothing, Optional cacheDuration As Nullable(Of TimeSpan) = Nothing) As CacheConfiguration

Parameters

queryStringCachingBehavior
Nullable<RuleQueryStringCachingBehavior>

Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.

queryParameters
String

query parameters to include or exclude (comma separated).

isCompressionEnabled
Nullable<RuleIsCompressionEnabled>

Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.

cacheBehavior
Nullable<RuleCacheBehavior>

Caching behavior for the requests.

cacheDuration
Nullable<TimeSpan>

The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss.

Returns

A new CacheConfiguration instance for mocking.

Applies to