CacheRemove()

removes elements from cache defined with argument ids.

CacheRemove( ids=object, throwOnError=boolean, cacheName=string );

Returns: void

Argument Description
ids
object, required

This can be a string list of multiple elements or an array containing the keys

Alias: names, keys

throwOnError
boolean, optional

define if the functions throws an exception when the element does not exist (default is false)

cacheName
string, optional

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

Alias: cache, region

Examples

<cfset cacheremove_obj = "fruits">
<cfset cachePut('cacheremove_obj',cacheremove_obj,createTimespan(0,0,0,30),createTimespan(0,0,0,30),'region_cachename')>
<cfset cacheremove('cacheremove_obj',true)>

See also