lucee.Componentcontentbox.modules.contentbox-deps.modules.cbstorages.models.CacheStorage
Copyright Ortus Solutions, Corp www.ortussolutions.com --- This storage leverages cachebox in order to operate. It simulates a session/client storage bucket in cache.
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
appName
Application name, comes from the application settings.
|
true
|
false
|
|
any
|
cache
The cache provider to use.
|
true
|
false
|
|
any
|
settings
Settings.
|
true
|
false
|
|
numeric
|
timeout
Session Timeout, defaults to 60 minutes.
|
60
|
true
|
false
|
Constructor Summary | |
---|---|
init(any settings, any cachebox)
Constructor. |
Method Summary | |
---|---|
CacheStorage
|
clearAll()
Clear the entire coldbox session storage. |
CacheStorage
|
deleteVar(any name)
Delete a variable in storage. |
boolean
|
exists(any name)
Checks wether the permanent variable exists. |
string
|
getAppName()
|
string
|
getCache()
|
private string
|
getSessionKey()
Builds the unique Session Key of a user request. |
string
|
getSettings()
|
struct
|
getStorage()
Get the entire storage scope from cache. |
string
|
getTimeout()
|
any
|
getVar(any name, [any defaultValue])
Get a new variable in storage if it exists, else return default value, else will return null. |
CacheStorage
|
removeStorage()
Remove the bucket. |
any
|
setAppName(any appName)
|
any
|
setCache(any cache)
|
any
|
setSettings(any settings)
|
any
|
setTimeout(numeric timeout)
|
CacheStorage
|
setVar(any name, any value)
Set a new variable in storage. |
boolean
|
storageExists()
Check if storage exists. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
settings
- The storage settings structcachebox
- A reference to CacheBoxProperty Detail |
---|
Application name, comes from the application settings
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe cache provider to use
access
- publicrequired
- falsereturntype
- anyserializable
- trueSettings
access
- publicrequired
- falsereturntype
- anyserializable
- trueSession Timeout, defaults to 60 minutes
access
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
Clear the entire coldbox session storage
Delete a variable in storage
name
- The name of the data keyChecks wether the permanent variable exists
name
- The name of the data keyBuilds the unique Session Key of a user request
Get the entire storage scope from cache. If it does not exist, then create the default bucket
Get a new variable in storage if it exists, else return default value, else will return null.
name
- The name of the data keydefaultValue
- The default value to return if not found in storageRemove the bucket
appName
cache
settings
timeout
Set a new variable in storage
name
- The name of the data keyvalue
- The value of the data to storeCheck if storage exists