lucee.Component cachebox.system.cache.config.CacheBoxConfig
This is a CacheBox configuration object. You can use it to configure a CacheBox instance
Constructor Summary | |
---|---|
init([any CFCConfig], [string CFCConfigPath])
Constructor. |
Method Summary | |
---|---|
any
|
cache(string name, [string provider='[runtime expression]'], [struct properties='[runtime expression]'])
Add a new cache configuration. |
boolean
|
cacheExists(string name)
Check if a cache definition exists. |
any
|
defaultCache([numeric objectDefaultTimeout], [numeric objectDefaultLastAccessTimeout], [numeric reapFrequency], [numeric maxObjects], [numeric freeMemoryPercentageThreshold], [boolean useLastAccessTimeouts], [string evictionPolicy], [numeric evictCount], [string objectStore], [boolean coldboxEnabled])
Add a default cache configuration. |
struct
|
getCache(string name)
Get a specifed cache definition. |
struct
|
getCaches()
Get the configured caches. |
struct
|
getDefaultCache()
Get the defaultCache definition. |
struct
|
getDefaults()
Get the default CacheBox settings. |
array
|
getListeners()
Get the configured listeners. |
string
|
getLogBoxConfig()
Get the logBox Configuration file to use. |
struct
|
getMemento()
Get the instance data. |
struct
|
getScopeRegistration()
Get the scope registration details. |
any
|
listener(string class, [struct properties='[runtime expression]'], [string name=''])
Add a new listener configuration. |
void
|
loadDataDSL(struct rawDSL)
Load a data configuration CFC data DSL. |
any
|
logBoxConfig(string config)
Set the logBox Configuration to use. |
void
|
reset()
Reset the configuration. |
void
|
resetCaches()
Reset the set caches. |
void
|
resetDefaultCache()
Reset the default cache configurations. |
void
|
resetListeners()
Reset the cache listeners. |
any
|
scopeRegistration([boolean enabled='[runtime expression]'], [string scope='[runtime expression]'], [string key='[runtime expression]'])
Use to define cachebox factory scope registration. |
void
|
validate()
Validates the configuration. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
CFCConfig
- The cacheBox Data Configuration CFCCFCConfigPath
- The cacheBox Data Configuration CFC path to useMethod Detail |
---|
Add a new cache configuration.
name
- The name of the cacheprovider
- The cache provider class, defaults to: cachebox.system.cache.providers.CacheBoxProviderproperties
- The structure of properties for the cacheCheck if a cache definition exists
name
- The cache to checkAdd a default cache configuration.
objectDefaultTimeout
objectDefaultLastAccessTimeout
reapFrequency
maxObjects
freeMemoryPercentageThreshold
useLastAccessTimeouts
evictionPolicy
evictCount
objectStore
coldboxEnabled
Get a specifed cache definition
name
- The cache configuration to retrieveGet the configured caches
Get the defaultCache definition.
Get the default CacheBox settings
Get the configured listeners
Get the logBox Configuration file to use
Get the instance data
Get the scope registration details
Add a new listener configuration.
class
- The class of the listenerproperties
- The structure of properties for the listnername
- The name of the listenerLoad a data configuration CFC data DSL
rawDSL
- The data configuration DSL structureSet the logBox Configuration to use
config
- The configuration file to useReset the configuration
Reset the set caches
Reset the default cache configurations
Reset the cache listeners
Use to define 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 cacheboxValidates the configuration. If not valid, it will throw an appropriate exception.