KeyValueCache.d.ts 476 B

12345678910111213
  1. export interface KeyValueCacheSetOptions {
  2. ttl?: number | null;
  3. }
  4. export interface KeyValueCache<V = string> {
  5. get(key: string): Promise<V | undefined>;
  6. set(key: string, value: V, options?: KeyValueCacheSetOptions): Promise<void>;
  7. delete(key: string): Promise<boolean | void>;
  8. }
  9. export interface TestableKeyValueCache<V = string> extends KeyValueCache<V> {
  10. flush?(): Promise<void>;
  11. close?(): Promise<void>;
  12. }
  13. //# sourceMappingURL=KeyValueCache.d.ts.map