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

Browsers can cache the results of the /custom_component route, leading to confusion when new versions are published #8168

Closed
1 task done
freddyaboulton opened this issue Apr 29, 2024 · 3 comments · Fixed by #8170
Assignees
Labels
bug Something isn't working custom-components Related to custom component cli or workflow

Comments

@freddyaboulton
Copy link
Collaborator

Describe the bug

This happened to me while I was developing the leaderboard component last week. I don't have screenshots but what happened was the following:

  • I had published v0.0.5 and it was on pypi and spaces
  • Add a new feature
  • Release v0.0.6 on pypi and install on spaces
  • Space UI looks as if v0.0.5 is used even though space has 0.0.6 wheel installed. (I know because the feature I added in version 0.0.6 was not show in the UI).
  • Scratch head.
  • I clear browser cache and everything looks as expected

We should set a Cache-Control: no-cache header so that browsers don't use any cached requests.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

Screenshot

No response

Logs

No response

System Info

gradio 4.27.0

Severity

I can work around it

@freddyaboulton freddyaboulton added bug Something isn't working custom-components Related to custom component cli or workflow labels Apr 29, 2024
@pngwn
Copy link
Member

pngwn commented Apr 29, 2024

I don't think we should set no cache but we could probably set a max age of 5 mins or so?

@pngwn
Copy link
Member

pngwn commented Apr 29, 2024

We could also look into etags to allow more efficient revalidation.

@freddyaboulton
Copy link
Collaborator Author

Yea makes sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working custom-components Related to custom component cli or workflow
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants