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
Talking with @annevk and others about the declarative API that @aboodman, Darin Fisher, and other have requested, several constraints come into focus:
the system must be able to skip caches entirely. That is to say, for some portion of URL space, it should be possible to say to the system "don't throw onfetch events for these URLs but instead go straight to the network stack"
the pattern to match should be longest-prefix-match, the same as for controller/scope matching
string URLs are mostly useless as the base URL that they are resolved against is the URL of the controller itself. URL objects are required in most cases
fallback resources must be able to be either network-fetched or programmatically created
we need a way to enumerate and manipulate the mappings. Calling it a map from a URL to a tuple feels reasonable.
we're not going to handle filter of sorts other than URL, meaning it's not possible to distinguish query params, header-based differences, etc. in a simple API.
For most things, the argument is "use onfetch if the mapping system doesn't get you there", and I think that's fine.
The text was updated successfully, but these errors were encountered:
We are choosing not to implement a declarative version of the system in v1. We will attempt to keep upstream caches happy with extra metadata (see: #27 ) and will collect information about what developers are doing and how much script execution costs us.
Talking with @annevk and others about the declarative API that @aboodman, Darin Fisher, and other have requested, several constraints come into focus:
onfetch
events for these URLs but instead go straight to the network stack"For most things, the argument is "use
onfetch
if the mapping system doesn't get you there", and I think that's fine.The text was updated successfully, but these errors were encountered: