# TagCache.get() method · @imqueue/tag-cache

Source: https://imqueue.org/api/tag-cache/latest/tag-cache.tagcache.get/
Published: 2026-07-31
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/tag-cache 3.0.3 — generated reference, not hand-written

Returns data stored under given keys. If a single key provided returns a single result, otherwise it will return an array of results associated with the keys

Values are JSON-decoded on the way out, so what comes back is what was passed to [TagCache.set()](https://imqueue.org/api/tag-cache/latest/tag-cache.tagcache.set/), not a string.

A redis failure is not thrown: it is logged as a warning and reported as `null`. That makes `null` ambiguous between "not cached" and "lookup failed", which is the right trade for a cache but means it must never be treated as proof that a value is absent.

**Signature:**

```typescript
get(...keys: string[]): Promise<any | null | (any | null)[]>;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| keys | string\[\] | one or more unprefixed keys to read |


**Returns:**

Promise<any \| null \| (any \| null)\[\]>

the decoded value for a single key, an array of values in the order the keys were given for several, or `null` — per element for a miss, or as the whole result on error

## Exceptions

TypeError when there is no redis connection — see [REDIS\_INIT\_ERROR](https://imqueue.org/api/tag-cache/latest/tag-cache.redis_init_error/)

