[**Documentation**](../../../README)

***

[Documentation](../../../README) / [@zerotal/tenancy](../README) / tenantCache

# Function: tenantCache()

> **tenantCache**(`store?`, `cacheResolver?`): `CacheManagerLike`

Defined in: [tenancy/src/tenantStorage.ts:141](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/tenancy/src/tenantStorage.ts#L141)

Return a proxy over the cache that prefixes every key with
`tenant:<slug>:` for the currently active tenant.

## Parameters

### store?

`string`

Optional store name (e.g. `'redis'`).

### cacheResolver?

`CacheResolverLike`

Optional — inject the Cache facade or manager directly.

## Returns

`CacheManagerLike`
