lucee.Componentcoldbox.system.cache.AbstractCacheBoxProvider
coldbox.system.cache.providers.CFProvider
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- This CacheBox provider communicates with the built in caches in the Adobe ColdFusion Engines
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
elementCleaner
The global element cleaner utility object.
|
true
|
false
|
Constructor Summary | |
---|---|
init()
Constructor. |
Method Summary | |
---|---|
boolean
|
clear(any objectKey)
Clears an object from the cache by using its cache key. |
any
|
clearAll()
Clear all the cache elements from the cache. |
boolean
|
clearQuiet(any objectKey)
Clears an object from the cache by using its cache key. |
any
|
clearStatistics()
Clear the cache statistics. |
any
|
configure()
configure the cache for operation. |
any
|
expireAll()
Expire all the elments in the cache (if supported by the provider): Not implemented by this cache. |
any
|
expireObject(any objectKey)
Expires an object from the cache by using its cache key. |
any
|
get(any objectKey)
Get an object from the cache. |
struct
|
getCachedObjectMetadata(any objectKey)
Get a cache objects metadata about its performance. |
string
|
getElementCleaner()
|
array
|
getKeys()
Returns a list of all elements in the cache, whether or not they are expired. |
any
|
getObjectStore()
If the cache provider implements it, this returns the cache's object store. |
any
|
getOrSet(any objectKey, any produce, [any timeout='0'], [any lastAccessTimeout='0'], [any extra='[runtime expression]'])
Tries to get an object from the cache, if not found, it calls the 'produce' closure to produce the data and cache it. |
any
|
getQuiet(any objectKey)
get an item silently from cache, no stats advised: Stats not available on lucee. |
numeric
|
getSize()
Get the number of elements in the cache. |
any
|
getStats()
Get the cache statistics object as coldbox. |
struct
|
getStoreMetadataKeyMap()
Get a key lookup structure where cachebox can build the report on. |
struct
|
getStoreMetadataReport()
Get a structure of all the keys in the cache with their appropriate metadata structures. |
boolean
|
isClusterCoherent()
|
private boolean
|
isDefaultCache()
Checks if the default cache is in use or another cache region. |
boolean
|
isExpired(any objectKey)
Has the object key expired in the cache: NOT IMPLEMENTED IN THIS CACHE. |
boolean
|
isNodeCoherent()
|
boolean
|
isTerracotaClustered()
|
boolean
|
lookup(any objectKey)
Check if an object is in cache, if not found it records a miss. |
boolean
|
lookupQuiet(any objectKey)
Check if an object is in cache, no stats updated or listeners. |
any
|
reap()
Send a reap or flush command to the cache: Not implemented by this provider. |
any
|
set(any objectKey, any object, [any timeout='0'], [any lastAccessTimeout='0'], [struct extra])
Sets an object in the cache and returns an instance of itself. |
any
|
setElementCleaner(any elementCleaner)
|
any
|
setQuiet(any objectKey, any object, [any timeout='0'], [any lastAccessTimeout='0'], [struct extra])
Sets an object in the cache with no event calls and returns an instance of itself. |
any
|
shutdown()
Shutdown command issued when CacheBox is going through shutdown phase. |
private any
|
validateConfiguration()
Validate the incoming configuration and make necessary defaults. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
Property Detail |
---|
The global element cleaner utility object
access
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
Clears an object from the cache by using its cache key. Returns false if object was not removed or did not exist anymore
clear
in interface
ICacheProvider
objectKey
- The object cache keyClear all the cache elements from the cache
clearAll
in interface
ICacheProvider
Clears an object from the cache by using its cache key. Returns false if object was not removed or did not exist anymore without doing statistics or updating listeners
clearQuiet
in interface
ICacheProvider
objectKey
- The object cache keyClear the cache statistics NOT IMPLEMENTED FOR ACF 2016+
clearStatistics
in interface
ICacheProvider
clearStatistics
in class
AbstractCacheBoxProvider
configure the cache for operation
configure
in interface
ICacheProvider
Expire all the elments in the cache (if supported by the provider): Not implemented by this cache
expireAll
in interface
ICacheProvider
Expires an object from the cache by using its cache key. Returns false if object was not removed or did not exist anymore (if supported by the provider) Not implemented by this cache
expireObject
in interface
ICacheProvider
objectKey
- The object cache keyGet an object from the cache
get
in interface
ICacheProvider
objectKey
- The key to retrieveGet a cache objects metadata about its performance. This value is a structure of name-value pairs of metadata.
getCachedObjectMetadata
in interface
ICacheProvider
objectKey
- The key to retrieveReturns a list of all elements in the cache, whether or not they are expired
getKeys
in interface
ICacheProvider
If the cache provider implements it, this returns the cache's object store.
getObjectStore
in interface
ICacheProvider
Tries to get an object from the cache, if not found, it calls the 'produce' closure to produce the data and cache it
getOrSet
in class
AbstractCacheBoxProvider
objectKey
- The object cache keyproduce
- The producer closure/lambdatimeout
- The timeout to use on the object (if any, provider specific)lastAccessTimeout
- The idle timeout to use on the object (if any, provider specific)extra
- A map of name-value pairs to use as extra arguments to pass to a providers set operationget an item silently from cache, no stats advised: Stats not available on lucee
getQuiet
in interface
ICacheProvider
objectKey
- The key to retrieveGet the number of elements in the cache
getSize
in interface
ICacheProvider
Get the cache statistics object as coldbox.system.cache.util.IStats
getStats
in interface
ICacheProvider
getStats
in class
AbstractCacheBoxProvider
Get a key lookup structure where cachebox can build the report on. Ex: [timeout=timeout,lastAccessTimeout=idleTimeout]. It is a way for the visualizer to construct the columns correctly on the reports
getStoreMetadataKeyMap
in interface
ICacheProvider
Get a structure of all the keys in the cache with their appropriate metadata structures. This is used to build the reporting.[keyX->[metadataStructure]]
getStoreMetadataReport
in interface
ICacheProvider
Checks if the default cache is in use or another cache region
Has the object key expired in the cache: NOT IMPLEMENTED IN THIS CACHE
isExpired
in interface
ICacheProvider
objectKey
- The key to retrieveCheck if an object is in cache, if not found it records a miss.
lookup
in interface
ICacheProvider
objectKey
- The key to retrieveCheck if an object is in cache, no stats updated or listeners
lookupQuiet
in interface
ICacheProvider
objectKey
- The key to retrieveSend a reap or flush command to the cache: Not implemented by this provider
reap
in interface
ICacheProvider
Sets an object in the cache and returns an instance of itself
set
in interface
ICacheProvider
objectKey
- The object cache keyobject
- The object to cachetimeout
- The timeout to use on the object (if any, provider specific)lastAccessTimeout
- The idle timeout to use on the object (if any, provider specific)extra
- A map of name-value pairs to use as extra arguments to pass to a providers set operationelementCleaner
Sets an object in the cache with no event calls and returns an instance of itself
setQuiet
in interface
ICacheProvider
objectKey
- The object cache keyobject
- The object to cachetimeout
- The timeout to use on the object (if any, provider specific)lastAccessTimeout
- The idle timeout to use on the object (if any, provider specific)extra
- A map of name-value pairs to use as extra arguments to pass to a providers set operationShutdown command issued when CacheBox is going through shutdown phase
shutdown
in interface
ICacheProvider
Validate the incoming configuration and make necessary defaults
validateConfiguration
in class
AbstractCacheBoxProvider