# Cache object

The `cache` object is used for retrieving values stored in the shop's Mechanic cache. For more on this, see [Using the cache](https://learn.mechanic.dev/platform/cache).

{% hint style="info" %}
Cache data is unavailable during [task preview](https://learn.mechanic.dev/core/tasks/previews).
{% endhint %}

## How to access it

* Use `{{ cache["some_key"] }}` or `{{ cache.some_key }}` in any task code
* Use `{% for keyval in cache %}` to iterate through the keys and values in your account's cache

### Related articles

* [The "cache" action](https://learn.mechanic.dev/core/actions/cache)
* [Using cache endpoints to share data](https://learn.mechanic.dev/platform/cache/endpoints)
* [Using the cache](https://learn.mechanic.dev/platform/cache)
