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

(Temporary) caching cdn handler until we sort out bundling #3

Closed

Conversation

maartenbreddels
Copy link
Member

@maartenbreddels maartenbreddels commented Sep 7, 2018

Issue to solve

For loading js modules, we have to choose a system, either the notebook extension method or the jupyter lab bundling. This new loader (frontend) will be a temporary solution that will 'just work' until we find the proper way to do this. It will try to fetch from <server>/voila/require/module@semver, which at the server will

  • try to find the cached version and return that
  • if not found will fetch it from a CDN (default is unpkg) and write it to cache

But only for modules in a whitelist (security concern)

Issues:

It will not respect semver, so will never fetch a patched version once it cached a version.

Where cache?

It first tries {prefix}/share/jupyter/voila_cache/{module}/{semver}, and on failure will use the user directory.

Note

This is based on #2, so that first needs to be merged, and this rebased.

@SylvainCorlay
Copy link
Member

Could you rebase this PR on master to isolate the only change.

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

Successfully merging this pull request may close these issues.

2 participants