-
Notifications
You must be signed in to change notification settings - Fork 2.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
Caching is not working properly with Repositories.GetContents #1503
Comments
I see you already found #242 (where I probably would have put this issue). I would suggest contacting the |
Update: At first place it was really confusing because it works occasionally! then I noticed, sometimes Github API server sends An easy workaround for
But anyways we should check why |
Maybe you could submit a PR to the Alternatively (or in addition 😄), you could submit a PR to this repo with a unit test demonstrating the Third option - if you could put a tiny-as-possible test case into this issue that demonstrates the Thanks for the investigation. |
The |
It's not a Go issue because document says EOF is optional. I'm sending a PR to fix the issue in Since issue is happening inside JSON decoder (where we read the body), we cannot have a test/PR in this repo, sorry :) |
OK, sounds good to me. Thanks, @m4ns0ur. |
For reference: gregjones/httpcache#104 |
If so, would you mind referencing your PR in that issue as well? |
@gmlewis I don't think so. |
The httpcache transport is breaking authentication where no fix seems to be implemented yet. I'd propose to revert the change for now to be able to use authenticated requests in tools like `k/release/cmd/release-notes`. Refers to: google/go-github#1503, gregjones/httpcache#104 Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
Not sure if it's
go-github
issue orhttpcache
one.I'm trying to cache
Repositories.GetContents
responses to avoid my rate limit's burning.At first run (
diskcache
file is going to be created for the first time), it worksBut if you run it again, after 60s (Github API's
max-age
), it doesn't work anymoreThe text was updated successfully, but these errors were encountered: