UNPKG

@linkedmink/multilevel-aging-cache

Version:

Package provides an interface to cache and persist data to Redis, MongoDB, memory

12 lines 857 B
import { IAgingCache } from './cache/IAgingCache'; import { IAgingCacheOptions } from './cache/IAgingCacheOptions'; import { IStorageHierarchy } from './storage/IStorageHierarchy'; export declare function checkAgingCacheOptionsValid(options: IAgingCacheOptions, maxLevel: number): Error | undefined; /** * Create a new instance of IAgingCache. This function is a factory that will construct the * corrent implementation based on the provided options. * @param hierarchy The storage hierarchy with the level index 0 being the lowest level * @param options Options for the behavior of the cache, if undefined use getDefaultAgingCacheOptions */ export declare function createAgingCache<TKey, TValue>(hierarchy: IStorageHierarchy<TKey, TValue>, options?: IAgingCacheOptions): IAgingCache<TKey, TValue>; //# sourceMappingURL=CacheFactory.d.ts.map