The Cache interface provides a storage mechanism for Request
Response object pairs that are cached, for example as part of
web.workers.ServiceWorker
life cycle. Note that the Cache interface
exposed to windowed scopes as well as workers. You don't have
use it in conjunction with service workers, even though it is
in the service worker spec.
The Cache interface provides a storage mechanism for Request Response object pairs that are cached, for example as part of `web.workers.ServiceWorker` life cycle. Note that the Cache interface exposed to windowed scopes as well as workers. You don't have use it in conjunction with service workers, even though it is in the service worker spec.
(add this & args)
Method.
The add() method of the web.service-workers.Cache
interface
a URL, retrieves it, and adds the resulting response object to
given cache.
cache.add(request).then(function() { // request has been added to the cache });
See also: https://developer.mozilla.org/en-US/docs/Web/API/Cache/add
Method. The add() method of the `web.service-workers.Cache` interface a URL, retrieves it, and adds the resulting response object to given cache. `cache.add(request).then(function() { // request has been added to the cache });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Cache/add`
(add-all this & args)
Method.
The addAll() method of the web.service-workers.Cache
interface
an array of URLs, retrieves them, and adds the resulting response
to the given cache. The request objects created during retrieval
keys to the stored response operations.
cache.addAll(requests[]).then(function() { // requests have been added to the cache });
See also: https://developer.mozilla.org/en-US/docs/Web/API/Cache/addAll
Method. The addAll() method of the `web.service-workers.Cache` interface an array of URLs, retrieves them, and adds the resulting response to the given cache. The request objects created during retrieval keys to the stored response operations. `cache.addAll(requests[]).then(function() { // requests have been added to the cache });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Cache/addAll`
(delete this & args)
Method.
The delete() method of the web.service-workers.Cache
interface
the web.service-workers.Cache
entry whose key is the request,
if found, deletes the web.service-workers.Cache
entry and returns
js.Promise
that resolves to true. If no web.service-workers.Cache
is found, it resolves to false.
cache.delete(request,{options}).then(function(true) { //your cache entry has been deleted });
See also: https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete
Method. The delete() method of the `web.service-workers.Cache` interface the `web.service-workers.Cache` entry whose key is the request, if found, deletes the `web.service-workers.Cache` entry and returns `js.Promise` that resolves to true. If no `web.service-workers.Cache` is found, it resolves to false. `cache.delete(request,{options}).then(function(true) { //your cache entry has been deleted });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete`
(keys this & args)
Method.
The keys() method of the web.service-workers.Cache
interface
a js.Promise
that resolves to an array of web.service-workers.Cache
cache.keys(request,{options}).then(function(keys) { //do something with your array of requests });
See also: https://developer.mozilla.org/en-US/docs/Web/API/Cache/keys
Method. The keys() method of the `web.service-workers.Cache` interface a `js.Promise` that resolves to an array of `web.service-workers.Cache` `cache.keys(request,{options}).then(function(keys) { //do something with your array of requests });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Cache/keys`
(match this & args)
Method.
The match() method of the web.service-workers.Cache
interface
a js.Promise
that resolves to the web.fetch.Response
associated
the first matching request in the web.service-workers.Cache
If no match is found, the js.Promise
resolves to js.undefined
.
cache.match(request, {options}).then(function(response) { // Do something with the response });
See also: https://developer.mozilla.org/en-US/docs/Web/API/Cache/match
Method. The match() method of the `web.service-workers.Cache` interface a `js.Promise` that resolves to the `web.fetch.Response` associated the first matching request in the `web.service-workers.Cache` If no match is found, the `js.Promise` resolves to `js.undefined`. `cache.match(request, {options}).then(function(response) { // Do something with the response });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Cache/match`
(match-all this & args)
Method.
The matchAll() method of the web.service-workers.Cache
interface
a js.Promise
that resolves to an array of all matching responses
the web.service-workers.Cache
object.
cache.matchAll(request,{options}).then(function(response) { //do something with the response array });
See also: https://developer.mozilla.org/en-US/docs/Web/API/Cache/matchAll
Method. The matchAll() method of the `web.service-workers.Cache` interface a `js.Promise` that resolves to an array of all matching responses the `web.service-workers.Cache` object. `cache.matchAll(request,{options}).then(function(response) { //do something with the response array });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Cache/matchAll`
(put this & args)
Method.
The put() method of the web.service-workers.Cache
interface
key/value pairs to be added to the current web.service-workers.Cache
cache.put(request, response).then(function() { // request/response pair has been added to the cache });
See also: https://developer.mozilla.org/en-US/docs/Web/API/Cache/put
Method. The put() method of the `web.service-workers.Cache` interface key/value pairs to be added to the current `web.service-workers.Cache` `cache.put(request, response).then(function() { // request/response pair has been added to the cache });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/Cache/put`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close