ColdBox Platform Version 3.7.0

coldbox.system.cache.util
Class ElementCleaner

WEB-INF.cftags.component
        extended by coldbox.system.cache.util.ElementCleaner

public class ElementCleaner
extends WEB-INF.cftags.component

A ColdBox utility to help clean cached objects for ColdBox Application Caches


Constructor Summary
init(any<ICacheProvider> cacheProvider)
          Constructor
 
Method Summary
 void clearAllEvents()
          Clears all events from the cache
 void clearAllViews()
          Clears all views from the cache
 void clearByKeySnippet(any keySnippet, [any regex='false'])
          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
 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
 any<ICacheProvider> getAssociatedCache()
          Get the associated cache provider/manager of type: coldbox
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any<ICacheProvider> cacheProvider)
Constructor

Parameters:
cacheProvider - The associated cache manager/provider of type: coldbox.system.cache.ICacheProvider
Method Detail

clearAllEvents

public void clearAllEvents()
Clears all events from the cache.


clearAllViews

public void clearAllViews()
Clears all views from the cache.


clearByKeySnippet

public void clearByKeySnippet(any keySnippet, [any regex='false'])
Clears keys using the passed in object key snippet

Parameters:
keySnippet - the cache key snippet to use
regex - Use regex or not

clearEvent

public void clearEvent(any eventsnippet, [any queryString=''])
Clears 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

Parameters:
eventsnippet - The event snippet to clear on. Can be partial or full
queryString - If passed in, it will create a unique hash out of it. For purging purposes

clearEventMulti

public void clearEventMulti(any eventsnippets, [any queryString=''])
Clears 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

Parameters:
eventsnippets - The comma-delimmitted list event snippet to clear on. Can be partial or full
queryString - 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.

clearView

public void clearView(any viewSnippet)
Clears all view name permutations from the cache according to the view name.

Parameters:
viewSnippet - The view name snippet to purge from the cache

clearViewMulti

public void clearViewMulti(any viewSnippets)
Clears all view name permutations from the cache according to the view name.

Parameters:
viewSnippets - The comma-delimmitted list or array of view snippet to clear on. Can be partial or full

getAssociatedCache

public any<ICacheProvider> getAssociatedCache()
Get the associated cache provider/manager of type: coldbox.system.cache.ICacheProvider


ColdBox Platform Version 3.7.0