lucee.Component
coldbox.system.cache.config.CacheBoxConfig
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com ---- This is a CacheBox configuration object. You can use it to configure a CacheBox variables.
| Property Summary | ||||
|---|---|---|---|---|
| type | property | default | serializable | required |
struct
|
DEFAULTS
Get the static default configuration struct.
|
true
|
false
|
|
struct
|
caches
The caches configuration.
|
true
|
false
|
|
struct
|
defaultCache
The default cache config.
|
true
|
false
|
|
array
|
listeners
The scope configuration settings.
|
true
|
false
|
|
any
|
logBoxConfig
The logbox config dsl this config object represents.
|
true
|
false
|
|
struct
|
scopeRegistration
The scope configuration settings.
|
true
|
false
|
|
| Constructor Summary | |
|---|---|
|
init([any CFCConfig], [string CFCConfigPath])
Constructor. |
|
| Method Summary | |
|---|---|
any
|
cache(any name, [string provider='[runtime expression]'], [struct properties='[runtime expression]'])
Add a new cache config. |
boolean
|
cacheExists(any name)
Check if a cache definition exists. |
CacheBoxConfig
|
defaultCache([numeric objectDefaultTimeout], [numeric objectDefaultLastAccessTimeout], [numeric reapFrequency], [numeric maxObjects], [numeric freeMemoryPercentageThreshold], [boolean useLastAccessTimeouts], [string evictionPolicy], [numeric evictCount], [string objectStore], [boolean coldboxEnabled])
Setup the default cache. |
struct
|
getCache(any name)
Get a specified cache definition. |
string
|
getCaches()
|
string
|
getDEFAULTS()
|
string
|
getDefaultCache()
|
string
|
getListeners()
|
string
|
getLogBoxConfig()
|
struct
|
getMemento()
A quick snapshot of the state. |
string
|
getScopeRegistration()
|
CacheBoxConfig
|
listener(any class, [struct properties='[runtime expression]'], [any name=''])
Add a new listener configuration. |
CacheBoxConfig
|
loadDataDSL(struct rawDSL)
Load a data configuration CFC data DSL. |
CacheBoxConfig
|
logBoxConfig(string config)
Set the logBox Configuration to use. |
CacheBoxConfig
|
reset()
Reset the configuration. |
CacheBoxConfig
|
resetCaches()
Reset the set caches. |
CacheBoxConfig
|
resetDefaultCache()
Reset the default cache configurations. |
CacheBoxConfig
|
resetListeners()
Reset the set listeners. |
any
|
scopeRegistration([boolean enabled='[runtime expression]'], [string scope='[runtime expression]'], [string key='[runtime expression]'])
Define the cachebox factory scope registration. |
any
|
setCaches(struct caches)
|
any
|
setDEFAULTS(struct DEFAULTS)
|
any
|
setDefaultCache(struct defaultCache)
|
any
|
setListeners(array listeners)
|
any
|
setLogBoxConfig(any logBoxConfig)
|
any
|
setScopeRegistration(struct scopeRegistration)
|
CacheBoxConfig
|
validate()
Validates the configuration. |
| Methods inherited from class lucee.Component |
|---|
| None |
| Constructor Detail |
|---|
Constructor
CFCConfig - The cacheBox Data Configuration CFC instanceCFCConfigPath - The cacheBox Data Configuration CFC path to use| Property Detail |
|---|
Get the static default configuration struct
access - publicrequired - falsereturntype - anyserializable - trueThe caches configuration
access - publicrequired - falsereturntype - anyserializable - trueThe default cache config
access - publicrequired - falsereturntype - anyserializable - trueThe scope configuration settings
access - publicrequired - falsereturntype - anyserializable - trueThe logbox config dsl this config object represents
access - publicrequired - falsereturntype - anyserializable - trueThe scope configuration settings
access - publicrequired - falsereturntype - anyserializable - true| Method Detail |
|---|
Add a new cache config
name - The cache nameprovider - The cache provider class, defaults to: coldbox.system.cache.providers.CacheBoxProviderproperties - The structure of properties for the cacheCheck if a cache definition exists
name - The cache nameSetup the default cache
objectDefaultTimeout - The default object timeout in minutesobjectDefaultLastAccessTimeout - The last access or idle timeout in minutesreapFrequency - The reaping frequency in minutesmaxObjects - The max objects to storefreeMemoryPercentageThreshold - Activate free ram thresholdsuseLastAccessTimeouts - use idle timeoutsevictionPolicy - The eviction policy to useevictCount - How many objects to evictobjectStore - The storage providercoldboxEnabled - Is this ColdBox enabled or standaloneGet a specified cache definition
name - The cache nameA quick snapshot of the state
Add a new listener configuration
class - The class of the listenerproperties - The struct of properties for the listenername - The unique name of the listenerLoad a data configuration CFC data DSL
rawDSLSet the logBox Configuration to use
config - The configuration file to useReset the configuration
Reset the set caches
Reset the default cache configurations
Reset the set listeners
Define the cachebox factory scope registration
enabled - Enable registrationscope - The scope to register on, defaults to application scopekey - The key to use in the scope, defaults to cacheboxcachesDEFAULTSdefaultCachelistenerslogBoxConfigscopeRegistrationValidates the configuration. If not valid, it will throw an appropriate exception.