PartitionedCacheKeyOptions
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
Defined in: packages/pipeline-cache/src/helpers/cache-key.ts:17
Options for createPartitionedCacheKeyFactory.
Extends
Section titled “Extends”Properties
Section titled “Properties”includeTenant?
Section titled “includeTenant?”
optionalincludeTenant?: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.
Default
Section titled “Default”trueInherited from
Section titled “Inherited from”TenantPartitionOptions.includeTenant
principal
Section titled “principal”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.
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”string | undefined
requirePrincipal?
Section titled “requirePrincipal?”
optionalrequirePrincipal?: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.
Default
Section titled “Default”truerequireScope?
Section titled “requireScope?”
optionalrequireScope?: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.
Default
Section titled “Default”truerequireTenant?
Section titled “requireTenant?”
optionalrequireTenant?: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”.
Default
Section titled “Default”the value of includeTenant
Inherited from
Section titled “Inherited from”TenantPartitionOptions.requireTenant
scope?
Section titled “scope?”
optionalscope?: (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.
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”string | undefined