Workers expose the cached results in ‘caches.default’ for the browser, what is the JSON structure of this object?
Thanks for this. But I was looking for the JSON structure of the caches.default object.
Okay. My bad! I was asking about the object and the properties actually.
In options there are many. So may be a example would help.
Well, that is exactly what is explaind in the link I posted.
Okay. Let me go through it in detail. Will come back if I have any questions. Thanks for ur time!
This is not related to the structure,but cache. event.waitUntil(cache.put(request, response.clone())); can this be done asynchronously aswell? Or only the event.waitUntil works?
Asynchronously? That method already is asynchronous and returns a promise.
caches.put would return a promise yes. But is event.waitUntil required to hold the worker until the promise is returned. Can this also be done async?