Sha256: c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605

Contents?: true

Size: 1.22 KB

Versions: 29

Compression:

Stored size: 1.22 KB

Contents

import type { RequestInfo, Response, Request } from './fetch'

export interface CacheStorage {
  match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>,
  has (cacheName: string): Promise<boolean>,
  open (cacheName: string): Promise<Cache>,
  delete (cacheName: string): Promise<boolean>,
  keys (): Promise<string[]>
}

declare const CacheStorage: {
  prototype: CacheStorage
  new(): CacheStorage
}

export interface Cache {
  match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>,
  matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>,
  add (request: RequestInfo): Promise<undefined>,
  addAll (requests: RequestInfo[]): Promise<undefined>,
  put (request: RequestInfo, response: Response): Promise<undefined>,
  delete (request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>,
  keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request[]>
}

export interface CacheQueryOptions {
  ignoreSearch?: boolean,
  ignoreMethod?: boolean,
  ignoreVary?: boolean
}

export interface MultiCacheQueryOptions extends CacheQueryOptions {
  cacheName?: string
}

export declare const caches: CacheStorage

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
clapton-0.0.6 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.5 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.4 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.3 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.2 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.1 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
pokeedex-0.1.0 node_modules/undici-types/cache.d.ts
pcp-server-ruby-sdk-0.0.6 node_modules/undici-types/cache.d.ts
pcp-server-ruby-sdk-0.1.0 node_modules/undici-types/cache.d.ts