Re: [w3c/ServiceWorker] What does "the registration’s storage key’s name to cache map" mean? (Issue #1784)

yoshisatoyanagisawa left a comment (w3c/ServiceWorker#1784)

Hi @annevk, let me ask several questions upon your comment:

1. Regarding @wanderview's suggestion "Can you not use request's reserved client as the environment?", I just wondered if it is guaranteed to be non-null.  Note that we do not assert non-null for the sub resource case.
2. Considering your point "I don't think it makes sense for the abstract concept of a storage key to have an associated name to cache map", the current phrase in the ServiceWorker spec, "Each storage key has an associated name to cache map," should be incorrect. Would it make sense to remove the sentence and add an explanation using the "obtain a local storage bottle map" algorithm in the "5.5 CacheStorage" section?
3. Regarding your concern about "storage key coming from nowhere", could you clarify how we should interpret the storage key within the ServiceWorkerRegistration definition?  It isn't associated with an environment in the definition, but it seems to be used as the persistent anchor for the registration. If that's its role, why can't it also serve as the identifier for looking up CacheStorage?

I appreciate your guidance on this.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1784#issuecomment-3154102766
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/issues/1784/3154102766@github.com>

Received on Tuesday, 5 August 2025 08:33:51 UTC