# 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](/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)
* [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)
* [CacheRemove](/boxlang-framework/modularity/compat-cfml/reference/built-in-functions/cache/cacheremove.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/cachegetmetadata.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.
