dla
Version:
node.js data loader with caching and support of lists
14 lines (13 loc) • 463 B
TypeScript
import { Cache } from './cache';
import * as Types from './shared-types';
export declare class MemoryCache<V> extends Cache<V> {
store: {
[id: string]: V;
};
has(key: string): Promise<boolean>;
get(key: string): Promise<V>;
set(key: string, value: V, options?: Types.IOptionsTTL): Promise<void>;
setnx(key: string, value: V, options?: Types.IOptionsTTL): Promise<void>;
remove(key: string): Promise<void>;
flush(): void;
}