Class CacheConfiguration


  • public final class CacheConfiguration
    extends Object
    Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object.
    • Constructor Detail

      • CacheConfiguration

        public CacheConfiguration()
    • Method Detail

      • queryStringCachingBehavior

        public RuleQueryStringCachingBehavior 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

        public String queryParameters()
        Get the queryParameters property: query parameters to include or exclude (comma separated).
        Returns:
        the queryParameters value.
      • withQueryParameters

        public CacheConfiguration withQueryParameters​(String queryParameters)
        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

        public RuleIsCompressionEnabled 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

        public CacheConfiguration withIsCompressionEnabled​(RuleIsCompressionEnabled isCompressionEnabled)
        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

        public RuleCacheBehavior cacheBehavior()
        Get the cacheBehavior property: Caching behavior for the requests.
        Returns:
        the cacheBehavior value.
      • withCacheBehavior

        public CacheConfiguration withCacheBehavior​(RuleCacheBehavior cacheBehavior)
        Set the cacheBehavior property: Caching behavior for the requests.
        Parameters:
        cacheBehavior - the cacheBehavior value to set.
        Returns:
        the CacheConfiguration object itself.
      • cacheDuration

        public String 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

        public CacheConfiguration withCacheDuration​(String cacheDuration)
        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.