-
Notifications
You must be signed in to change notification settings - Fork 1.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
Response caching #2648
Response caching #2648
Conversation
…achingHttpClient around existing IHttpClient in Connection
020fc2b
to
6c5d2d9
Compare
@kfcampbell Thanks for sticking labels against the feature I raised - #2649 👍 This is my first PR against this project, is there anything else I need to do to push this forward? |
Hey @reny-gearset, thank you for the contributions here! ❤️ | The item is on this board to be reviewed - we'll let you know if anything comes up! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @reny-gearset, Thanks again for getting this knocked out. This LGTM and should be good to merge once CI is ✅ ❤️
Hey @reny-gearset , just a quick note about the sourcelink failure in the windows CI build. It is unrelated to your change and is something we are working on. Apologies for the noise. |
@reny-gearset @nickfloyd any documentation or example on how to use this properly? |
As @Revyn112 stated. Is there some documentation what one needs to set there? |
Resolves #2649
Behavior
Before the change?
After the change?
IResponseCache
and setting it in theResponseCache
property inGitHubClient
, we provide a way to cache GET responses and retain the API rate limit usage when its Etag matches. Specifically, we set theIf-None-Matched
header in the request with the non-null and non-empty Etag value from the cached response before sending it to Github.Other information
Additional info
Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!
Type: Breaking change
label)If
Yes
, what's the impact:Pull request type
Please add the corresponding label for change this PR introduces:
Type: Bug
Type: Feature
Type: Documentation
Type: Maintenance