Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/ogone/src/ogone.dom.d.ts>Cache

Advanced Web Composition for Future
Latest
interface Cache
import { type Cache } from "https://deno.land/x/ogone@revb3/src/ogone.dom.d.ts";

Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache export interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec.

Methods

add(request: RequestInfo): Promise<void>
addAll(requests: RequestInfo[]): Promise<void>
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>
keys(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>
match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>
matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>
put(request: RequestInfo, response: Response): Promise<void>