UNPKG

cache-layer

Version:

An abstraction for cache providers, it exposes a common interface for diferente ways of cache

13 lines 513 B
import CacheContract from '../models/cache-contract'; import { Options } from '../models/options'; export default class InMemoryCacheProvider implements CacheContract { private client; private defaultTTL; constructor(options: Options); get<T>(key: string): Promise<T>; has(key: string): Promise<boolean>; delete(key: string): Promise<boolean>; add<T>(key: string, data: T, ttl?: number | string): Promise<boolean>; private getTTL; } //# sourceMappingURL=in-memory-provider.d.ts.map