Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-script-invoking Mapping System Needed #38

Closed
slightlyoff opened this issue Apr 23, 2013 · 1 comment
Closed

Non-script-invoking Mapping System Needed #38

slightlyoff opened this issue Apr 23, 2013 · 1 comment

Comments

@slightlyoff
Copy link
Contributor

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.

@slightlyoff
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant