Skip to main content
Cache - Cache - Web documentation
interface Cache
Private

Methods

put(
request: RequestInfo | URL,
response: Response,
): Promise<void>

Put the provided request/response into the cache.

How is the API different from browsers?

  1. You cannot match cache objects using by relative paths.
  2. You cannot pass options like ignoreVary, ignoreMethod, ignoreSearch.
match(
request: RequestInfo | URL,
): Promise<Response | undefined>

Return cache object matching the provided request.

How is the API different from browsers?

  1. You cannot match cache objects using by relative paths.
  2. You cannot pass options like ignoreVary, ignoreMethod, ignoreSearch.
delete(
request: RequestInfo | URL,
): Promise<boolean>

Delete cache object matching the provided request.

How is the API different from browsers?

  1. You cannot delete cache objects using by relative paths.
  2. You cannot pass options like ignoreVary, ignoreMethod, ignoreSearch.