import * as NodeCache from "node-cache"; export interface ICacheOptions extends NodeCache.Options { loosingWindowRate: number; } export interface IMemCache extends NodeCache { lock(key: string, ttl?: number): boolean; unlock(key: string): boolean; lockMany(keys: string[], ttl: number): boolean; unlockMany(keys: string[]): boolean; getLoosingCache(key: string, fnGetVal: (key: string) => Promise, ttlS: number): Promise; expireLoosingCache(key: string): boolean; isLoosingCacheExpired(key: string): boolean; removeLoosingCache(key: string): boolean; rewriteLoosingCache(key: string, val: TVal, ttlS: number): boolean; } export declare function genMemCache(options?: ICacheOptions): IMemCache; export declare const memMutex: IMemCache;