# CacheRemove()

removes elements from cache defined with argument ids.

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

**Returns:** void

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| ids | object | Yes | This can be a string list of multiple elements or an array containing the keys *Alias: names, keys* |  |
| throwOnError | boolean | No | define if the functions throws an exception when the element does not exist (default is false) |  |
| cacheName | string | No | 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

```cfml
<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)>
```







# Categories

[Cache](../../categories/cache.md)