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 TypeMethodDescriptionintGets the cache size limit.longGets the file lifeTime.intGets the file size limit.booleanisDebug()Is debug set?voidsetCacheSizeLimit(int limit) Sets the cache size limit.voidsetDebug(boolean debug) Sets debug option.voidsetFileLifeTime(long lifeTime) Sets the file lifetime.voidsetFileSizeLimit(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
-