import type { ISecondaryEntityCache } from './EntitySecondaryCacheLoader.ts'; import type { IEntityGenericCacher } from './IEntityGenericCacher.ts'; /** * A custom secondary read-through entity cache is a way to add a custom second layer of caching for a particular * single entity load. One common way this may be used is to add a second layer of caching in a hot path that makes * a call to EntityLoader.loadManyByFieldEqualityConjunctionAsync is guaranteed to return at most one entity. */ export declare abstract class GenericSecondaryEntityCache, TIDField extends keyof TFields, TLoadParams> implements ISecondaryEntityCache { private readonly cacher; private readonly constructCacheKey; constructor(cacher: IEntityGenericCacher, constructCacheKey: (params: Readonly) => string); loadManyThroughAsync(loadParamsArray: readonly Readonly[], fetcher: (fetcherLoadParamsArray: readonly Readonly[]) => Promise, Readonly | null>>): Promise, Readonly | null>>; /** * Invalidate the cache for objects cached by constructCacheKey(loadParams). * * @param loadParamsArray - load params to invalidate */ invalidateManyAsync(loadParamsArray: readonly Readonly[]): Promise; }