Skip to content

PartitionedCacheKeyOptions

Defined in: packages/pipeline-cache/src/helpers/cache-key.ts:17

Options for createPartitionedCacheKeyFactory.

optional includeTenant?: boolean

Defined in: packages/pipeline/dist/helpers/tenant-partition.d.ts:10

Whether the key has a tenant segment, so equal identifiers in two tenants never share a key.

true

TenantPartitionOptions.includeTenant


principal: (context) => string | undefined

Defined in: packages/pipeline-cache/src/helpers/cache-key.ts:25

Resolves the principal the response is scoped to.

Required whenever the handler performs entity-level authorization or field filtering, because a cache hit skips the handler entirely — and therefore skips those checks.

IPipelineContext

string | undefined


optional requirePrincipal?: boolean

Defined in: packages/pipeline-cache/src/helpers/cache-key.ts:43

Whether a missing principal is an error.

Set to false only for genuinely public, identical-for-everyone responses.

true

optional requireScope?: boolean

Defined in: packages/pipeline-cache/src/helpers/cache-key.ts:53

Whether a missing authorization scope is an error rather than an omitted segment.

Set to false only when responses do not depend on the caller’s permissions; scope may then be omitted.

true

optional requireTenant?: boolean

Defined in: packages/pipeline/dist/helpers/tenant-partition.d.ts:18

Whether a missing tenant is an error rather than an absent segment. includeTenant answers “is the tenant part of the key”; this answers “may it be absent”.

the value of includeTenant

TenantPartitionOptions.requireTenant


optional scope?: (context) => string | undefined

Defined in: packages/pipeline-cache/src/helpers/cache-key.ts:34

Resolves a fingerprint of the caller’s permission scope — a role-set hash or a capability version.

Without it, a principal whose roles change keeps reading responses computed under the old permissions until the entry expires.

IPipelineContext

string | undefined