# CacheKeyExists()

this function is deprecated, use instead [CacheIdExists()](cacheidexists.md).

Returns true/false whether the cache contains an element with the certain keyname.

**Status:** deprecated

```
CacheKeyExists( key=string, cacheName=string );
```

**Returns:** boolean

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| key | string | Yes | key to check *Alias: name, id* |  |
| 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

*There are currently no examples for this function.*







# Categories

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