Flushes the cache

cacheClear([filter] [, cacheName]) → returns numeric

This function requires Lucee.  Not supported on Adobe ColdFusion, etc.

Argument Reference

filterOrTags any

A String containing a key filter for the elements in the cache to flush, the filter follow the same rules as for cfdirectory-filter OR an Array containing tags defined when put into the cache

cacheName string

Definition of the cache used by name, when not set the "default Object Cache" defined in Lucee Administrator is used instead

Sample code invoking the cacheClear function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub