You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't understand how would this be correct for a "put" operation? To explain my confusion, I'd expect querying of the cache for which put method has been called, to maybe contain a cache hit for a matching request, meaning the "query cache" procedure may return a non-empty list (if equivalent request was there). Why should the implementation throw an InvalidStateError then? Or am I reading the entire parable in wrong context? The later step 4.2.6.6 instructs to run the "query cache" procedure again:
Set requestResponses to the result of running Query Cache with operation’s request.
Doesn't the above read more or less exactly like 4.2.3, while the latter already expects any result (an empty or non-empty list) while the former would have thrown had the cache querying returned a non-empty list?
I must be reading the spec. wrong, but I just can't seem to squint my eyes the right way to see if I can make sense of the above for my part.
The text was updated successfully, but these errors were encountered:
In step 4.2.3 "addedItems" is the last argument to query cache; this means that rather than querying the actual cache we're looking for matches in the requests/responses that were stored due to other put operations in the same batch. I.e. if that query cache returns a non-empty result there must be duplicate requests in the batch.
https://w3c.github.io/ServiceWorker/#batch-cache-operations specifies the following step 4.2.3 under "Output":
I don't understand how would this be correct for a "put" operation? To explain my confusion, I'd expect querying of the cache for which
put
method has been called, to maybe contain a cache hit for a matching request, meaning the "query cache" procedure may return a non-empty list (if equivalent request was there). Why should the implementation throw anInvalidStateError
then? Or am I reading the entire parable in wrong context? The later step 4.2.6.6 instructs to run the "query cache" procedure again:Doesn't the above read more or less exactly like 4.2.3, while the latter already expects any result (an empty or non-empty list) while the former would have thrown had the cache querying returned a non-empty list?
I must be reading the spec. wrong, but I just can't seem to squint my eyes the right way to see if I can make sense of the above for my part.
The text was updated successfully, but these errors were encountered: