Skip to main content

invalidateEntityLists

API Docs


Function: invalidateEntityLists()

invalidateEntityLists(cache, entity): Promise<void>

Defined in: src/services/caching/invalidation.ts:37

Invalidate all list caches for a specific entity type. Use this after mutations that affect list queries (create, delete, bulk update).

Parameters

cache

An object with a clearByPattern method (e.g., CacheService or metrics proxy).

clearByPattern

entity

string

The entity type.

Returns

Promise<void>

Example

await invalidateEntityLists(ctx.cache, "organization");