TenantConfig
●tagtree · /core·interface
Declares how a tenant value maps to a cache-key prefix; the key function serializes the
tenant to its string segment, while extraTags injects additional per-tenant invalidation
tags such as a shop's custom domain alias.
Properties
PROPTYPEDESCRIPTION
type
T
Phantom field carrying the TypeScript type of the tenant value for inference.
key
unknown
extraTags?
unknown
Example
const tenant: TenantConfig<Shop> = {
type: {} as Shop,
key: (shop) => shop.id,
extraTags: (shop) => shop.domains,
};Related
ContractTestOptions runAdapterContract AdapterCtx CacheAdapter CacheInstance CacheKey CacheSchema CacheSchemaShape
MetadataOpen in GitHub ↗
runAdapterContract
Registers a Vitest describe block that verifies an adapter implementation satisfies the CacheAdapter contract; call this inside each adapter package's own test
WrapOpts
Percall options for CacheInstance.wrap, extending basic storage controls with a staleness guard that prevents a latearriving write from overwriting an invalidat