# CacheGet

Get an item from the cache.

If the item is not found, the default value will be returned if provided, else null will be returned. By default, the {@code cacheName} is set to {@code default}.

## Method Signature

```
CacheGet(id=[any], cacheName=[any], throwWhenNotExist=[any])
```

### Arguments

| Argument            | Type  | Required | Description                                                         | Default   |
| ------------------- | ----- | -------- | ------------------------------------------------------------------- | --------- |
| `id`                | `any` | `true`   | The cache id to retrieve, or an array of ids to retrieve            |           |
| `cacheName`         | `any` | `false`  | The cache name to retrieve the id from, defaults to {@code default} | `default` |
| `throwWhenNotExist` | `any` | `false`  |                                                                     | `false`   |

## Examples

## Related

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