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

Allows immutable cache for static files in a directory #1268

Merged
merged 3 commits into from
May 10, 2023

Conversation

brichet
Copy link
Contributor

@brichet brichet commented May 2, 2023

As mentioned in jupyterlab/jupyterlab#10273 and jupyterlab/jupyterlab#14124, JupyterLab now uses hashes for the javascript assets.

This PR allows to serve static files as immutable to avoid server requests (when the static files have no-cache header), by setting up the setting "static_immutable_cache".

Additional context:
Discussed in weekly meeting jupyter-server/team-compass#45 (comment)

@welcome
Copy link

welcome bot commented May 2, 2023

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@blink1073 blink1073 merged commit 54d7292 into jupyter-server:main May 10, 2023
@welcome
Copy link

welcome bot commented May 10, 2023

Congrats on your first merged pull request in this project! 🎉
congrats
Thank you for contributing, we are very proud of you! ❤️

@brichet brichet deleted the immutable_cache branch May 22, 2023 09:13
@brichet
Copy link
Contributor Author

brichet commented May 29, 2023

@meeseeksdev please backport to 1.x

@lumberbot-app
Copy link

lumberbot-app bot commented May 29, 2023

Awww, sorry brichet you do not seem to be allowed to do that, please ask a repository maintainer.

@brichet
Copy link
Contributor Author

brichet commented May 29, 2023

Should it be backported to 1.x ?

@blink1073
Copy link
Contributor

@meeseeksdev please backport to 1.x

@lumberbot-app
Copy link

lumberbot-app bot commented May 30, 2023

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 1.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 54d72923949a506375c522193b41b3cff3aaa79f
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #1268: Allows immutable cache for static files in a directory'
  1. Push to a named branch:
git push YOURFORK 1.x:auto-backport-of-pr-1268-on-1.x
  1. Create a PR against branch 1.x, I would have named this PR:

"Backport PR #1268 on branch 1.x (Allows immutable cache for static files in a directory)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

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

Successfully merging this pull request may close these issues.

3 participants