blog.showEntry
. This event executes, gets an entry from the database and sets a view to be rendered. The framework then renders the view and if event caching is turned on for this event, the framework will cache the HTML produced. So the next incoming show entry event will just spit out the cached HTML. The cache key is created by hashing the incoming request collection.event=blog.showEntry&id=1
& event=blog.showEntry&id=2
are two different cacheable events.ColdBox.cfc
called coldbox.eventcaching
to true
.cache
cachetimeout
cacheLastAccesstimeout
cacheProvider
template
which all ColdBox applications have by default. You can open or create a new CacheBox configuration object and decide where the storage is, timeouts, providers, etc. You have complete control of how event and view caching is stored.clearEvent( string eventSnippet, string 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 permutationsclearEventMulti( eventsnippets,string 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 permutationsclearAllEvents( [boolean async=true] )
: Can clear ALL cached events in one shot and can be run asynchronously.OnRequestCapture
- Influence Cache KeyspreProcess
postProcess