# CacheRemove

Deletes a single element from the cache.

## Method Signature

```
CacheRemove(id=[any], throwOnError=[boolean], cacheName=[string])
```

### Arguments

| Argument       | Type      | Required | Description                                                               | Default   |
| -------------- | --------- | -------- | ------------------------------------------------------------------------- | --------- |
| `id`           | `any`     | `true`   | A single ID or an array of IDs to remove from the cache.                  |           |
| `throwOnError` | `boolean` | `false`  | If true, throw an exception if the key is not found. Default is false.    | `false`   |
| `cacheName`    | `string`  | `false`  | The name of the cache to get the keys from. Default is the default cache. | `default` |

## Examples

## Related

* [CacheClear](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cacheclear.md)
* [CacheCount](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cachecount.md)
* [cacheDelete](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cachedelete.md)
* [CacheGet](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cacheget.md)
* [CacheGetAll](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cachegetall.md)
* [CacheGetAllIds](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cachegetallids.md)
* [CacheGetAsAttempt](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cachegetasattempt.md)
* [CacheGetDefaultCacheName](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cachegetdefaultcachename.md)
* [CacheGetEngineProperties](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cachegetengineproperties.md)
* [CacheGetMetadata](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cachegetmetadata.md)
* [CacheGetOrFail](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cachegetorfail.md)
* [CacheGetProperties](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cachegetproperties.md)
* [CacheGetSession](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cachegetsession.md)
* [CacheIdExists](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cacheidexists.md)
* [cacheKeyExists](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cachekeyexists.md)
* [CachePut](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cacheput.md)
* [CacheRegionExists](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cacheregionexists.md)
* [CacheRegionNew](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cacheregionnew.md)
* [CacheRegionRemove](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cacheregionremove.md)
* [CacheRemoveAll](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cacheremoveall.md)
* [CacheSetProperties](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cachesetproperties.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cacheremove.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
