Package org.opencms.staticexport
Class CmsSharedCacheConfiguration
java.lang.Object
org.opencms.staticexport.CmsSharedCacheConfiguration
Configuration for the shared cache delivery mode.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCachePolicy(CmsSharedCachePolicy policy) Adds a cache policy.Returns the configured cache policies in configuration order.getCachePolicy(String contentType) Returns the cache policy for a content type.Returns the default cache policy.booleanReturns whether shared cache settings have been configured explicitly.booleanReturns whether shared cache delivery is enabled.voidsetEnabled(String enabled) Sets whether shared cache delivery is enabled.voidvalidate()Validates the shared cache configuration.
-
Constructor Details
-
CmsSharedCacheConfiguration
public CmsSharedCacheConfiguration()
-
-
Method Details
-
getCachePolicies
Returns the configured cache policies in configuration order.- Returns:
- the configured cache policies
-
getCachePolicy
Returns the cache policy for a content type.Exact content type policies take precedence over top-level wildcard policies. The default policy is returned if no content type policy matches.
- Parameters:
contentType- the content type- Returns:
- the matching cache policy, or the default policy
-
getDefaultCachePolicy
Returns the default cache policy.- Returns:
- the default cache policy, or
nullif none is configured
-
isConfigured
Returns whether shared cache settings have been configured explicitly.- Returns:
trueif shared cache settings have been configured
-
isEnabled
Returns whether shared cache delivery is enabled.- Returns:
trueif shared cache delivery is enabled
-
setEnabled
Sets whether shared cache delivery is enabled.- Parameters:
enabled- if shared cache delivery is enabled
-
validate
Validates the shared cache configuration.- Throws:
CmsConfigurationException- if the configuration is invalid