Class CmsSharedCacheConfiguration

java.lang.Object
org.opencms.staticexport.CmsSharedCacheConfiguration

public class CmsSharedCacheConfiguration extends Object
Configuration for the shared cache delivery mode.

  • Constructor Details

  • Method Details

    • addCachePolicy

      public void addCachePolicy(CmsSharedCachePolicy policy)
      Adds a cache policy.

      Parameters:
      policy - the cache policy
    • 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 null if none is configured
    • isConfigured

      public boolean isConfigured()
      Returns whether shared cache settings have been configured explicitly.

      Returns:
      true if shared cache settings have been configured
    • isEnabled

      public boolean isEnabled()
      Returns whether shared cache delivery is enabled.

      Returns:
      true if shared cache delivery is enabled
    • setEnabled

      public void setEnabled(String enabled)
      Sets whether shared cache delivery is enabled.

      Parameters:
      enabled - if shared cache delivery is enabled
    • validate

      public void validate() throws CmsConfigurationException
      Validates the shared cache configuration.

      Throws:
      CmsConfigurationException - if the configuration is invalid