PrefixingKeyValueCache.d.ts 821 B

123456789101112131415
  1. import type { KeyValueCache, KeyValueCacheSetOptions } from ".";
  2. declare const prefixesAreUnnecessaryForIsolationSymbol: unique symbol;
  3. export declare class PrefixingKeyValueCache<V = string> implements KeyValueCache<V> {
  4. private wrapped;
  5. private prefix;
  6. [prefixesAreUnnecessaryForIsolationSymbol]?: true;
  7. constructor(wrapped: KeyValueCache<V>, prefix: string);
  8. get(key: string): Promise<V | undefined>;
  9. set(key: string, value: V, options?: KeyValueCacheSetOptions): Promise<void>;
  10. delete(key: string): Promise<boolean | void>;
  11. static prefixesAreUnnecessaryForIsolation<V = string>(c: KeyValueCache<V>): boolean;
  12. static cacheDangerouslyDoesNotNeedPrefixesForIsolation<V = string>(c: KeyValueCache<V>): KeyValueCache<V>;
  13. }
  14. export {};
  15. //# sourceMappingURL=PrefixingKeyValueCache.d.ts.map