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.26 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.25 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.24 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.23 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.22 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.21 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.20 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.19 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.18 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.17 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.16 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.15 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.14 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.13 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.12 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.11 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.10 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.9 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.8 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts
clapton-0.0.7 lib/clapton/javascripts/node_modules/undici-types/cache.d.ts