Skip to content

Commit 953b6d3

Browse files
Clarify cache access in Handle Fetch (#1786)
The previous wording "the registration’s storage key’s name to cache map" was ambiguous. This change clarifies the mechanism for accessing caches during a fetch event handled by a service worker. Specifically, it replaces the ambiguous phrase with a direct call to "obtain a local storage bottle map" from the Storage specification, using the reserved client's environment. This makes the process of retrieving the cache map explicit and aligns the specification with modern storage standards. This addresses the issue raised in #1784 Co-authored-by: Domenic Denicola <[email protected]>
1 parent 83a8993 commit 953b6d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/index.bs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3241,7 +3241,8 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
32413241
1. Else if |source| is {{RouterSourceEnum/"cache"}}, or |source|["{{RouterSourceDict/cacheName}}"] [=map/exists=], then:
32423242
1. If |shouldSoftUpdate| is true, then [=in parallel=] run the [=Soft Update=] algorithm with |registration|.
32433243
1. Set |timingInfo|’s [=service worker timing info/worker cache lookup start=] to the [=coarsened shared current time=] given |useHighResPerformanceTimers|.
3244-
1. [=map/For each=] |cacheName| &#x2192; |cache| of the |registration|'s [=service worker registration/storage key=]'s [=name to cache map=].
3244+
1. Let |caches| be the result of running [=obtain a local storage bottle map=] with |reservedClient| and "<code>caches</code>".
3245+
1. [=map/For each=] |cacheName| &#x2192; |cache| of |caches|.
32453246
1. If |source|["{{RouterSourceDict/cacheName}}"] [=map/exists=] and |source|["{{RouterSourceDict/cacheName}}"] [=string/is=] not |cacheName|, [=continue=].
32463247
1. Let |requestResponses| be the result of running [=Query Cache=] with |request|, a new {{CacheQueryOptions}}, and |cache|.
32473248
1. If |requestResponses| is an empty [=list=], return |timingInfo|.

0 commit comments

Comments
 (0)