CacheStorage

package js.html

Available on js

The CacheStorage interface represents the storage for Cache objects.

Documentation CacheStorage by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Constructor

new(namespace:CacheStorageNamespace, principal:Dynamic)

Throws:

null

DOMError

Methods

delete(cacheName:String):Promise<Bool>

Finds the Cache object matching the cacheName, and if found, deletes the Cache object and returns a Promise that resolves to true. If no Cache object is found, it returns false.

has(cacheName:String):Promise<Bool>

Returns a Promise that resolves to true if a Cache object matching the cacheName exists.

keys():Promise<Array<String>>

Returns a Promise that will resolve with an array containing strings corresponding to all of the named Cache objects tracked by the CacheStorage. Use this method to iterate over a list of all the Cache objects.

match(request:Request, ?options:Null<CacheQueryOptions>):Promise<Response>

match(request:String, ?options:Null<CacheQueryOptions>):Promise<Response>

Checks if a given Request is a key in any of the Cache objects that the CacheStorage object tracks, and returns a Promise that resolves to that match.

open(cacheName:String):Promise<Cache>

Returns a Promise that resolves to the Cache object matching the cacheName (a new cache is created if it doesn't already exist.)

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/CacheStorage.html