Class CacheConfiguration
java.lang.Object
com.azure.resourcemanager.cdn.models.CacheConfiguration
Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the cacheBehavior property: Caching behavior for the requests.Get the cacheDuration property: The duration for which the content needs to be cached.Get the isCompressionEnabled property: Indicates whether content compression is enabled.Get the queryParameters property: query parameters to include or exclude (comma separated).Get the queryStringCachingBehavior property: Defines how Frontdoor caches requests that include query strings.voidvalidate()Validates the instance.withCacheBehavior(RuleCacheBehavior cacheBehavior) Set the cacheBehavior property: Caching behavior for the requests.withCacheDuration(String cacheDuration) Set the cacheDuration property: The duration for which the content needs to be cached.withIsCompressionEnabled(RuleIsCompressionEnabled isCompressionEnabled) Set the isCompressionEnabled property: Indicates whether content compression is enabled.withQueryParameters(String queryParameters) Set the queryParameters property: query parameters to include or exclude (comma separated).withQueryStringCachingBehavior(RuleQueryStringCachingBehavior queryStringCachingBehavior) Set the queryStringCachingBehavior property: Defines how Frontdoor caches requests that include query strings.
-
Constructor Details
-
CacheConfiguration
public CacheConfiguration()
-
-
Method Details
-
queryStringCachingBehavior
Get the queryStringCachingBehavior property: 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.- Returns:
- the queryStringCachingBehavior value.
-
withQueryStringCachingBehavior
public CacheConfiguration withQueryStringCachingBehavior(RuleQueryStringCachingBehavior queryStringCachingBehavior) Set the queryStringCachingBehavior property: 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.- Parameters:
queryStringCachingBehavior- the queryStringCachingBehavior value to set.- Returns:
- the CacheConfiguration object itself.
-
queryParameters
Get the queryParameters property: query parameters to include or exclude (comma separated).- Returns:
- the queryParameters value.
-
withQueryParameters
Set the queryParameters property: query parameters to include or exclude (comma separated).- Parameters:
queryParameters- the queryParameters value to set.- Returns:
- the CacheConfiguration object itself.
-
isCompressionEnabled
Get the isCompressionEnabled property: 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.- Returns:
- the isCompressionEnabled value.
-
withIsCompressionEnabled
Set the isCompressionEnabled property: 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.- Parameters:
isCompressionEnabled- the isCompressionEnabled value to set.- Returns:
- the CacheConfiguration object itself.
-
cacheBehavior
Get the cacheBehavior property: Caching behavior for the requests.- Returns:
- the cacheBehavior value.
-
withCacheBehavior
Set the cacheBehavior property: Caching behavior for the requests.- Parameters:
cacheBehavior- the cacheBehavior value to set.- Returns:
- the CacheConfiguration object itself.
-
cacheDuration
Get the cacheDuration property: The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss.- Returns:
- the cacheDuration value.
-
withCacheDuration
Set the cacheDuration property: The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss.- Parameters:
cacheDuration- the cacheDuration value to set.- Returns:
- the CacheConfiguration object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-