EntityDecl
●tagtree · /core·interface
Declares a single entity within a cache schema, specifying the optional params it accepts for leaf-level key building and the parent entity names whose cache entries should also be invalidated when this entity is purged.
Properties
PROPTYPEDESCRIPTION
params?
P
parents?
R
Example
const entities = {
product: { params: { id: str } },
collection: { params: { handle: str }, parents: ['product'] },
} satisfies EntitiesMap;Related
ContractTestOptions runAdapterContract AdapterCtx CacheAdapter CacheInstance CacheKey CacheSchema CacheSchemaShape
MetadataOpen in GitHub ↗
EntitiesMap
Constraint type for the entities record passed to defineCache; maps entity names to their EntityDecl shapes, ensuring all values conform to the expected param a
FanoutInput
Arguments to computeFanout describing which entity to expand and the optional tenant and param values that narrow the resulting tag set.