railo-context.Component coldbox.system.cache.AbstractCacheBoxProvider coldbox.system.cache.providers.MockProvider
A mock cache provider
Constructor Summary | |
---|---|
init()
Simple Constructor. |
Method Summary | |
---|---|
any
|
clear(any objectKey)
Clears an object from the cache by using its cache key. |
void
|
clearAll()
Clear all the cache elements from the cache. |
void
|
clearAllEvents([any async])
Clears all events from the cache. |
void
|
clearAllViews([any async])
Clears all views from the cache. |
void
|
clearByKeySnippet(any keySnippet, [any regex], [any async])
Clears keys using the passed in object key snippet. |
void
|
clearEvent(any eventsnippet, [any queryString=''])
Clears all the event permutations from the cache according to snippet and querystring. |
void
|
clearEventMulti(any eventsnippets, [any queryString=''])
Clears all the event permutations from the cache according to the list of snippets and querystrings. |
any
|
clearQuiet(any objectKey)
Clears an object from the cache by using its cache key. |
void
|
clearView(any viewSnippet)
Clears all view name permutations from the cache according to the view name. |
void
|
clearViewMulti(any viewSnippets)
Clears all view name permutations from the cache according to the view name. |
void
|
configure()
This method makes the cache ready to accept elements and run. |
void
|
expireAll()
Expire all the elments in the cache. |
void
|
expireObject(any objectKey)
Expires an object from the cache by using its cache key. |
any
|
get(any objectKey)
Get an object from the cache and updates stats. |
any
|
getCachedObjectMetadata(any objectKey)
Get a cache objects metadata about its performance. |
any
|
getColdbox()
Get the coldbox application reference. |
any
|
getEventCacheKeyPrefix()
Get the event cache key prefix. |
any
|
getEventURLFacade()
Get the event caching URL facade utility. |
any
|
getKeys()
Returns a list of all elements in the cache, whether or not they are expired. |
any<IObjectStore>
|
getObjectStore()
If the cache provider implements it, this returns the cache's object store as type: coldbox. |
any
|
getQuiet(any objectKey)
Get an object from the cache without updating stats or listners. |
any
|
getSize()
Get the number of elements in the cache. |
any
|
getStoreMetadataKeyMap()
Get a key lookup structure where cachebox can build the report on. |
any
|
getStoreMetadataReport()
Get a structure of all the keys in the cache with their appropriate metadata structures. |
any
|
getViewCacheKeyPrefix()
Get the cached view key prefix. |
any
|
isExpired(any objectKey)
Has the object key expired in the cache. |
any
|
lookup(any objectKey)
Check if an object is in cache, if not found it records a miss. |
any
|
lookupQuiet(any objectKey)
Check if an object is in cache, no stats updated or listeners. |
any
|
lookupValue(any objectValue)
Check if an object is in cache, if not found it records a miss. |
void
|
reap()
Reap the caches for expired objects and expiries. |
any
|
set(any objectKey, any object, [any timeout], [any lastAccessTimeout], [any extra])
sets an object in cache. |
void
|
setColdbox(any coldbox)
Set the coldbox application reference. |
any
|
setQuiet(any objectKey, any object, [any timeout], [any lastAccessTimeout], [any extra])
sets an object in cache and returns true if set correctly, else false. |
void
|
shutdown()
Shutdown command issued when CacheBox is going through shutdown phase. |
Methods inherited from class coldbox.system.cache.AbstractCacheBoxProvider |
---|
clearStatistics, getCacheFactory, getCacheID, getConfiguration, getEventManager, getMemento, getName, getStats, getUtil, isEnabled, isReportingEnabled, setCacheFactory, setConfiguration, setEventManager, setName, statusCheck |
Methods inherited from class railo-context.Component |
---|
None |
Constructor Detail |
---|
Simple Constructor
Method Detail |
---|
Clears an object from the cache by using its cache key. Returns false if object was not removed or did not exist anymore
objectKey
- The object cache keyClear all the cache elements from the cache
Clears all events from the cache.
clearAllEvents
in interface
IColdboxApplicationCache
async
- Run command asynchronously or notClears all views from the cache.
clearAllViews
in interface
IColdboxApplicationCache
async
- Run command asynchronously or notClears keys using the passed in object key snippet
keySnippet
- the cache key snippet to useregex
- Use regex or notasync
- Run command asynchronously or notClears all the event permutations from the cache according to snippet and querystring. Be careful when using incomplete event name with query strings as partial event names are not guaranteed to match with query string permutations
clearEvent
in interface
IColdboxApplicationCache
eventsnippet
- The event snippet to clear on. Can be partial or fullqueryString
- If passed in, it will create a unique hash out of it. For purging purposesClears all the event permutations from the cache according to the list of snippets and querystrings. Be careful when using incomplete event name with query strings as partial event names are not guaranteed to match with query string permutations
clearEventMulti
in interface
IColdboxApplicationCache
eventsnippets
- The comma-delimmitted list event snippet to clear on. Can be partial or fullqueryString
- The comma-delimmitted list of queryStrings passed in. If passed in, it will create a unique hash out of it. For purging purposes. If passed in the list length must be equal to the list length of the event snippets passed in.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
objectKey
- The object cache keyClears all view name permutations from the cache according to the view name.
clearView
in interface
IColdboxApplicationCache
viewSnippet
- The view name snippet to purge from the cacheClears all view name permutations from the cache according to the view name.
clearViewMulti
in interface
IColdboxApplicationCache
viewSnippets
- The comma-delimmitted list or array of view snippet to clear on. Can be partial or fullThis method makes the cache ready to accept elements and run
Expire all the elments in the cache
Expires an object from the cache by using its cache key. Returns false if object was not removed or did not exist anymore
objectKey
- The object cache keyGet an object from the cache and updates stats
objectKey
- The object keyGet a cache objects metadata about its performance.
objectKey
- The key of the object to lookup its metadataGet the coldbox application reference
getColdbox
in interface
IColdboxApplicationCache
Get the event cache key prefix
getEventCacheKeyPrefix
in interface
IColdboxApplicationCache
Get the event caching URL facade utility
getEventURLFacade
in interface
IColdboxApplicationCache
Returns a list of all elements in the cache, whether or not they are expired.
If the cache provider implements it, this returns the cache's object store as type: coldbox.system.cache.store.IObjectStore
Get an object from the cache without updating stats or listners
objectKey
- The object keyGet the number of elements in the cache
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
Get a structure of all the keys in the cache with their appropriate metadata structures. This is used to build the reporting.
Get the cached view key prefix
getViewCacheKeyPrefix
in interface
IColdboxApplicationCache
Has the object key expired in the cache
objectKey
- The object keyCheck if an object is in cache, if not found it records a miss.
objectKey
- The key of the object to lookup.Check if an object is in cache, no stats updated or listeners
objectKey
- The key of the object to lookup.Check if an object is in cache, if not found it records a miss.
objectValue
- The value of the object to lookup.Reap the caches for expired objects and expiries
sets an object in cache.
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 operationSet the coldbox application reference
setColdbox
in interface
IColdboxApplicationCache
coldbox
- The coldbox application referencesets an object in cache and returns true if set correctly, else false. With no statistic updates or listener updates
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