Class CmsFlexCacheConfiguration

java.lang.Object
org.opencms.flex.CmsFlexCacheConfiguration

public class CmsFlexCacheConfiguration extends Object
Flex Cache configuration class.

Since:
6.0.0
  • Constructor Details

  • Method Details

    • getAvgCacheBytes

      public long getAvgCacheBytes()
      Returns the average cache bytes.

      Returns:
      the average cache bytes
    • getDeviceSelector

      Returns the deviceSelector.

      Returns:
      the deviceSelector
    • getDeviceSelectorConfiguration

      Returns the device selector configuration.

      Returns:
      the device selector configuration
    • getMaxCacheBytes

      public long getMaxCacheBytes()
      Returns the maxCacheBytes.

      Returns:
      the maxCacheBytes
    • getMaxEntryBytes

      public int getMaxEntryBytes()
      Returns the maxEntryBytes.

      Returns:
      the maxEntryBytes
    • getMaxKeys

      public int getMaxKeys()
      Returns the maxKeys.

      Returns:
      the maxKeys
    • initialize

      public void initialize(String enabled, String offline, String maxCacheBytes, String avgCacheBytes, String maxEntryBytes, String maxKeys)
      Initializes the flex cache configuration with required parameters.

      Parameters:
      enabled - enables or disable the flexcache
      offline - enable the flexcache for the offline project
      maxCacheBytes - the max bytes for cache
      avgCacheBytes - the average bytes for cache
      maxEntryBytes - the max bytes for entry
      maxKeys - the max keys
    • isCacheEnabled

      public boolean isCacheEnabled()
      Checks if flexcache is enabled or not.

      Returns:
      true if flexcache is enabled; otherwise false
    • isCacheOffline

      public boolean isCacheOffline()
      Checks the cacheOffline.

      Returns:
      true if cacheoffline is set to true; otherwise false
    • setAvgCacheBytes

      public void setAvgCacheBytes(long avgCacheBytes)
      Sets the avgCacheBytes.

      Parameters:
      avgCacheBytes - the avgCacheBytes to set
    • setCacheEnabled

      public void setCacheEnabled(boolean enabled)
      Sets the enabled.

      Parameters:
      enabled - the enabled to set
    • setCacheOffline

      public void setCacheOffline(boolean cacheOffline)
      Sets the cacheOffline.

      Parameters:
      cacheOffline - the cacheOffline to set
    • setDeviceSelectorConfiguration

      public void setDeviceSelectorConfiguration(String deviceSelector)
      Sets the device selector configuration.

      Parameters:
      deviceSelector - the device selector to set
    • setMaxCacheBytes

      public void setMaxCacheBytes(long maxCacheBytes)
      Sets the maxCacheBytes.

      Parameters:
      maxCacheBytes - the maxCacheBytes to set
    • setMaxEntryBytes

      public void setMaxEntryBytes(int maxEntryBytes)
      Sets the maxEntryBytes.

      Parameters:
      maxEntryBytes - the maxEntryBytes to set
    • setMaxKeys

      public void setMaxKeys(int maxKeys)
      Sets the maxKeys.

      Parameters:
      maxKeys - the maxKeys to set