# CacheRemoveAll()

This function is deprecated, use instead [CacheClear()](cacheclear.md).

Removes all elements from the cache.

**Status:** deprecated

```
CacheRemoveAll( cacheName=string );
```

**Returns:** number

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| 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 cacheremoveall_obj = structnew()>
<cfset cacheremoveall_obj.name = 'man'>
<cfset cachePut('cacheremoveall_obj',cacheremoveall_obj,createTimespan(0,0,0,30),createTimespan(0,0,0,30),'region_cachename')>
<cfset cacheRemoveAll('cacheremoveall_obj')>
```







# Categories

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