-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
[json] when downloading JSON Schema files, do Conditional GETs #101050
Comments
@aeschli I was hoping this could get a higher priority. I've gotten the VS team to prioritize this as well on their end. The reason is that I pay for server traffic and the free tier is no longer enough to handle the growing load from VS, VSCode and other editors. |
I need to plan time for this, as it requires implementing http caching on the vscode/node side. |
Thanks. I understand. One way to implement this could be this flow:
You can send these headers using I believe this is the same conceptual pattern implemented by VS as well. Right @jimmylewis? |
Yes, that pretty much summarizes the VS implementation. Should note that:
|
I added a cache with a local cache expiration of 3 days (for now). After the cache expiration we check the content again with the last known etag. |
Thank you!! Much appreciated |
To verify:
|
The requests coming in for JSON Schema files to SchemaStore.org don't check if the remote files have changed before downloading them. This puts unneeded pressure on the SchemaStore.org servers and it downloads more data than needed which will cost money for users that pay bandwidth by the megabyte.
By supporting Conditional GETs (HTTP 304) using either If-Modified-Since or If-None-Match request header, these issues are fixed.
The text was updated successfully, but these errors were encountered: