# CacheGetMetadata

Get the item metadata for a specific entry or entries.

By default, the {@code cacheName} is set to {@code default}.

The default metadata for a BoxCache is:

* cacheName : The cachename the entry belongs to
* hits : How many hits the entry has
* timeout : The timeout in seconds
* lastAccessTimeout : The last access timeout in seconds
* created : When the entry was created
* lastAccessed : When the entry was last accessed
* key : The key used to cache it
* metadata : Any extra metadata stored with the entry
* isEternal : If the object has a timeout of 0

## Method Signature

```
CacheGetMetadata(id=[any], cacheName=[string])
```

### Arguments

| Argument    | Type     | Required | Description                                                         | Default   |
| ----------- | -------- | -------- | ------------------------------------------------------------------- | --------- |
| `id`        | `any`    | `true`   |                                                                     |           |
| `cacheName` | `string` | `false`  | The cache name to retrieve the id from, defaults to {@code default} | `default` |

## 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)
* [CacheGet](https://boxlang.ortusbooks.com/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cacheget)
* [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)
* [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)
