UNPKG

@data-client/normalizr

Version:

Normalizes and denormalizes JSON according to schema for Redux and Flux applications

24 lines 1.03 kB
import { EndpointsCache, EntityCache } from './types.js'; import type Cache from '../denormalize/cache.js'; import type { GetEntity } from '../denormalize/getEntities.js'; import type { EntityInterface } from '../interface.js'; import type { EntityPath } from '../types.js'; export default class GlobalCache implements Cache { private dependencies; private cycleCache; private cycleIndex; private localCache; private getCache; private _getEntity; private resultCache; constructor(getEntity: GetEntity, entityCache: EntityCache, resultCache: EndpointsCache); getEntity(pk: string, schema: EntityInterface, entity: any, computeValue: (localCacheKey: Map<string, any>) => void): object | undefined | symbol; private getCacheKey; /** Cache varies based on input (=== aka reference) */ getResults(input: any, cachable: boolean, computeValue: () => any): { data: any; paths: EntityPath[]; }; protected paths(): EntityPath[]; } //# sourceMappingURL=globalCache.d.ts.map