The add() method of the Cache interface takes a URL, retrieves it, and adds the resulting response object to the given cache.
The addAll() method of the Cache interface takes an array of URLs, retrieves them, and adds the resulting response objects to the given cache.
The delete() method of the Cache interface finds the Cache entry whose key is the request, and if found, deletes the Cache entry and returns a Promise that resolves to true.
Optionaloptions: CacheQueryOptionsThe keys() method of the Cache interface returns a representing the keys of the Cache.
Optionalrequest: URL | RequestInfoOptionaloptions: CacheQueryOptionsThe match() method of the Cache interface returns a Promise that resolves to the Response associated with the first matching request in the Cache object.
Optionaloptions: CacheQueryOptionsThe matchAll() method of the Cache interface returns a Promise that resolves to an array of all matching responses in the Cache object.
Optionalrequest: URL | RequestInfoOptionaloptions: CacheQueryOptionsThe put() method of the Often, you will just want to Window/fetch one or more requests, then add the result straight to your cache.
The
Cacheinterface provides a persistent storage mechanism for Request / Response object pairs that are cached in long lived memory. Available only in secure contexts.MDN Reference