Interface VirtualHostCacheConfig
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptionint
Gets the cache size limit.long
Gets the file lifeTime.int
Gets the file size limit.boolean
isDebug()
Is debug set?void
setCacheSizeLimit
(int limit) Sets the cache size limit.void
setDebug
(boolean debug) Sets debug option.void
setFileLifeTime
(long lifeTime) Sets the file lifetime.void
setFileSizeLimit
(int limit) Sets the file size limit.
-
Method Details
-
setFileSizeLimit
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
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
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
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
-