Interface VirtualHostCacheConfig

All Superinterfaces:
Config

public interface VirtualHostCacheConfig extends Config
Virtual Host Cache Configuration.

Configuration of the cache used by a virtual host.

Values can not be changed once the server has started.

Since:
4.4
  • Method Details

    • setFileSizeLimit

      void setFileSizeLimit(int limit) throws ConfigException
      Sets the file size limit.

      If the file to be served is over this size, do not cache the entire contents, but map the file instead.

      If this is not specified, 1Mb is assumed.

      Parameters:
      limit - file size limit in bytes
      Throws:
      ConfigException - if unable to set property
    • getFileSizeLimit

      int getFileSizeLimit()
      Gets the file size limit.
      Returns:
      file size limit
    • setCacheSizeLimit

      void setCacheSizeLimit(int limit) throws ConfigException
      Sets the cache size limit.

      If this is not specified, 10Mb is assumed.

      Parameters:
      limit - cache size limit in bytes
      Throws:
      ConfigException - if unable to set property
    • getCacheSizeLimit

      int getCacheSizeLimit()
      Gets the cache size limit.
      Returns:
      cache size limit
    • setFileLifeTime

      void setFileLifeTime(long lifeTime) throws ConfigException
      Sets the file lifetime.

      If the file has not been accessed within the time specified, remove the entry from the cache.

      If this is not specified, 1 day is assumed.

      Parameters:
      lifeTime - in milliseconds
      Throws:
      ConfigException - if unable to set property
    • getFileLifeTime

      long getFileLifeTime()
      Gets the file lifeTime.
      Returns:
      file lifeTime
    • setDebug

      void setDebug(boolean debug) throws ConfigException
      Sets debug option.

      By default this is false.

      Parameters:
      debug - true to set.
      Throws:
      ConfigException - if unable to set property
    • isDebug

      boolean isDebug()
      Is debug set?
      Returns:
      true if debug set