|
ColdBox Platform v3.8.0 | ||||
FRAMES |
WEB-INF.cftags.componentcoldbox.system.cache.AbstractCacheBoxProvider
coldbox.system.cache.providers.MockProvider
public class 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 WEB-INF.cftags.component |
---|
None
|
Constructor Detail |
---|
public init()
Method Detail |
---|
public any clear(any objectKey)
clear
in interface
ICacheProvider
objectKey
- The object cache keypublic void clearAll()
clearAll
in interface
ICacheProvider
public void clearAllEvents([any async])
clearAllEvents
in interface
IColdboxApplicationCache
async
- Run command asynchronously or notpublic void clearAllViews([any async])
clearAllViews
in interface
IColdboxApplicationCache
async
- Run command asynchronously or notpublic void clearByKeySnippet(any keySnippet, [any regex], [any async])
keySnippet
- the cache key snippet to useregex
- Use regex or notasync
- Run command asynchronously or notpublic void clearEvent(any eventsnippet, [any queryString=''])
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 purposespublic void clearEventMulti(any eventsnippets, [any queryString=''])
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.public any clearQuiet(any objectKey)
clearQuiet
in interface
ICacheProvider
objectKey
- The object cache keypublic void clearView(any viewSnippet)
clearView
in interface
IColdboxApplicationCache
viewSnippet
- The view name snippet to purge from the cachepublic void clearViewMulti(any viewSnippets)
clearViewMulti
in interface
IColdboxApplicationCache
viewSnippets
- The comma-delimmitted list or array of view snippet to clear on. Can be partial or fullpublic void configure()
configure
in interface
ICacheProvider
public void expireAll()
expireAll
in interface
ICacheProvider
public void expireObject(any objectKey)
expireObject
in interface
ICacheProvider
objectKey
- The object cache keypublic any get(any objectKey)
get
in interface
ICacheProvider
objectKey
- The object keypublic any getCachedObjectMetadata(any objectKey)
getCachedObjectMetadata
in interface
ICacheProvider
objectKey
- The key of the object to lookup its metadatapublic any getColdbox()
getColdbox
in interface
IColdboxApplicationCache
public any getEventCacheKeyPrefix()
getEventCacheKeyPrefix
in interface
IColdboxApplicationCache
public any getEventURLFacade()
getEventURLFacade
in interface
IColdboxApplicationCache
public any getKeys()
getKeys
in interface
ICacheProvider
public any<IObjectStore> getObjectStore()
getObjectStore
in interface
ICacheProvider
public any getQuiet(any objectKey)
getQuiet
in interface
ICacheProvider
objectKey
- The object keypublic any getSize()
getSize
in interface
ICacheProvider
public any getStoreMetadataKeyMap()
getStoreMetadataKeyMap
in interface
ICacheProvider
public any getStoreMetadataReport()
getStoreMetadataReport
in interface
ICacheProvider
public any getViewCacheKeyPrefix()
getViewCacheKeyPrefix
in interface
IColdboxApplicationCache
public any isExpired(any objectKey)
isExpired
in interface
ICacheProvider
objectKey
- The object keypublic any lookup(any objectKey)
lookup
in interface
ICacheProvider
objectKey
- The key of the object to lookup.public any lookupQuiet(any objectKey)
lookupQuiet
in interface
ICacheProvider
objectKey
- The key of the object to lookup.public any lookupValue(any objectValue)
objectValue
- The value of the object to lookup.public void reap()
reap
in interface
ICacheProvider
public any set(any objectKey, any object, [any timeout], [any lastAccessTimeout], [any extra])
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 operationpublic void setColdbox(any coldbox)
setColdbox
in interface
IColdboxApplicationCache
coldbox
- The coldbox application referencepublic any setQuiet(any objectKey, any object, [any timeout], [any lastAccessTimeout], [any extra])
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 operationpublic void shutdown()
shutdown
in interface
ICacheProvider
|
ColdBox Platform v3.8.0 | ||||
FRAMES |