InMemoryLRUCache.d.ts 581 B

12345678910111213
  1. import LRUCache from "lru-cache";
  2. import type { KeyValueCache, KeyValueCacheSetOptions } from "./KeyValueCache";
  3. export declare class InMemoryLRUCache<T = string> implements KeyValueCache<T> {
  4. private cache;
  5. constructor(lruCacheOpts?: LRUCache.Options<string, T>);
  6. static sizeCalculation<T>(item: T): number;
  7. set(key: string, value: T, options?: KeyValueCacheSetOptions): Promise<void>;
  8. get(key: string): Promise<T | undefined>;
  9. delete(key: string): Promise<boolean>;
  10. clear(): void;
  11. keys(): string[];
  12. }
  13. //# sourceMappingURL=InMemoryLRUCache.d.ts.map