UNPKG

@graphql-mesh/cache-cfw-kv

Version:
15 lines (14 loc) 584 B
import type { KeyValueCache, Logger } from '@graphql-mesh/types'; export default class CFWorkerKVCache implements KeyValueCache { private kvNamespace?; constructor(config: { namespace: string | KVNamespace; logger?: Logger; }); get<T>(key: string): Promise<T | undefined>; getKeysByPrefix(prefix: string): import("@whatwg-node/promise-helpers").MaybePromise<string[]>; set(key: string, value: any, options?: { ttl?: number; }): Promise<void>; delete(key: string): import("@whatwg-node/promise-helpers").MaybePromise<boolean>; }