Cache
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. Available only in secure contexts.
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun keys(request: String, options: CacheQueryOptions = definedExternally): ReadonlyArray<Request>
suspend fun keys(request: URL, options: CacheQueryOptions = definedExternally): ReadonlyArray<Request>
suspend fun keys(request: Request = definedExternally, options: CacheQueryOptions = definedExternally): ReadonlyArray<Request>
Link copied to clipboard
fun keysAsync(request: String, options: CacheQueryOptions = definedExternally): Promise<ReadonlyArray<Request>>
fun keysAsync(request: Request = definedExternally, options: CacheQueryOptions = definedExternally): Promise<ReadonlyArray<Request>>
fun keysAsync(request: URL, options: CacheQueryOptions = definedExternally): Promise<ReadonlyArray<Request>>
Link copied to clipboard
Link copied to clipboard
suspend fun matchAll(request: String, options: CacheQueryOptions = definedExternally): ReadonlyArray<Response>
suspend fun matchAll(request: URL, options: CacheQueryOptions = definedExternally): ReadonlyArray<Response>
suspend fun matchAll(request: Request = definedExternally, options: CacheQueryOptions = definedExternally): ReadonlyArray<Response>
Link copied to clipboard
fun matchAllAsync(request: String, options: CacheQueryOptions = definedExternally): Promise<ReadonlyArray<Response>>
fun matchAllAsync(request: Request = definedExternally, options: CacheQueryOptions = definedExternally): Promise<ReadonlyArray<Response>>
fun matchAllAsync(request: URL, options: CacheQueryOptions = definedExternally): Promise<ReadonlyArray<Response>>
Link copied to clipboard
fun matchAsync(request: Request, options: CacheQueryOptions = definedExternally): Promise<Response?>