UNPKG

@nuxthub/core

Version:

Build full-stack Nuxt applications on Cloudflare, with zero configuration.

23 lines (22 loc) 864 B
import type { KVNamespace } from '@cloudflare/workers-types'; export declare function hubCacheBinding(name?: string): KVNamespace; /** * Manage server cache * * @param projectUrl The project URL (e.g. https://my-deployed-project.nuxt.dev) * @param secretKey The secret key to authenticate to the remote endpoint * @param headers The headers to send with the request to the remote endpoint * * @example ```ts * const cache = proxyHubCache('https://my-deployed-project.nuxt.dev', 'my-secret-key') * const caches = await cache.list() * ``` * */ export declare function proxyHubCache(projectUrl: string, secretKey?: string, headers?: HeadersInit): { list(): Promise<Record<string, number>>; get(key: string): Promise<any>; del(key: string): Promise<void>; clear(base: string): Promise<void>; batchDel(keys: string[]): Promise<void>; };