-
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
a better caching experience for Octokit #530
Comments
👍 to option 1 |
I am happy to help in any way I can. My recent blog post on the Vary header (http://bizcoder.com/the-insanity-of-the-vary-header) was my first step to fixing the current vary implementation and the next major task is do a persistent storage mechanism. The current implementation is only an in-memory store. |
I think that's a "good enough" option for now for our use case, but perhaps down the track someone might want to implement their own backing store for it (imagine a service who wants to push that memory usage out of process, for example). |
I created a naive implementation of the latter solution by creating a custom http client https://github.com/nigel-sampson/octokit.caching |
Status update: I'm ranting and raving over in #781 about first class support for |
Yesterday I did a major update to my HTTPCache to fix the problems with the way the vary header is handled. I also renamed it because how it can handle being a shared cache too! This also caused a change to the storage interface. Next step is to produce a persistent storage mechanism. |
@darrelmiller so if I head down the road towards something like this does that make your life easier or harder? |
@shiftkey Much easier. Adding my cache would look pretty much exactly like you showed it in the example. |
👋 Hey Friends, this issue has been automatically marked as |
After discussions in #369 about WinInet I'm leaning towards a different approach for a couple of reasons:
DelegatingHandler
Tavis.PrivateCache has been proposed as a implementation of this, so I'm leaning towards one of two options around this:
Make Tavis.PrivateCache an development dependency, and bake it in
Pros:
Cons:
Expose
DelegatingHandler
inGitHubClient
and let others do the work wiring it upPros:
Cons:
The work required is probably about the same, but I'm leaning toward option 1 because it'll be simpler for users of the library.
cc @paulcbetts @darrelmiller @niik
The text was updated successfully, but these errors were encountered: