method IMultiTenancyService.prefixCacheKey
IMultiTenancyService.prefixCacheKey(
tenantId: string,
key: string
): string

Build a cache key that includes the tenant id, joined by the separator the plugin was configured with (cache.separator, default ':'). The separator is deliberately NOT a per-call argument: this method is the single home for separator resolution, so the middleware's ctx.state prefix and a caller's key can never disagree.

Parameters

tenantId: string

The resolved tenant id

key: string

The base cache key

Return Type

string

The prefixed cache key

Usage

import { type IMultiTenancyService } from "common/src/index.ts";