Module

x/evt/lib/index.ts

šŸ’§EventEmitter's typesafe replacement
Go to Latest
interface dom.Cache
import { type dom } from "https://deno.land/x/evt@v2.3.1/lib/index.ts";
const { Cache } = dom;

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 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>