UNPKG

@amirmarmul/waba-common

Version:

![GitHub release](https://img.shields.io/github/v/release/amirmarmul/waba-common?style=flat-square)

18 lines (17 loc) 615 B
/// <reference types="node" /> import { Store } from '../../../../core/domain/cache/Store'; type CacheRecord<T> = { data: T; expire?: number; }; export declare class ArrayStore implements Store { protected readonly store: Map<string, CacheRecord<any>>; protected readonly timeoutRefs: Map<string, NodeJS.Timeout>; get<T>(key: string): Promise<T | null>; put(key: string, value: unknown, ttl: number): Promise<boolean>; forever(key: string, value: unknown): Promise<boolean>; forget(key: string): Promise<boolean>; flush(): Promise<boolean>; getPrefix(): string; } export {};