Closed shiftkey closed 2 years ago
:thumbsup: 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.
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
Hubot img me Jonny Lee Miller 2015
Oh, where oh where are the other 48 hours I need in a day.
Status update: I'm ranting and raving over in #781 about first class support for HttpClient/HttpMessageHandler
- once I get that right I think this will be trivial to add - and I already have crazy ideas in my head about how to do it...
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 stale
because it has no recent activity. It will be closed if no further activity occurs. Please add the pinned
label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!
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