5 ms·
GitHub API HTTP client with cache support to get the most of your rate limit
- scoates 11y agoPardon my ignorance, but is there a practical benefit to running this instead of a general-purpose caching HTTP proxy? Wouldn't any well-behaving (caching + 304-respecting) proxy also keep the rate limit intact?
- btown 11y agoTo that point, I think a lot in this community (myself included) hear a lot more about reverse proxies (nginx, etc.) than regular proxies. Is there a well-behaving proxy that could this behavior our of the box, and is easy-to-integrate and actively maintained? (For instance, something that I could set as the proxy for my entire backend process with an environment variable, and it would pass through everything except github.com requests? Configurable cache time overrides on a per-domain basis?) I've seen Squid mentioned as a popular proxy - is this a use case it's intended to address?
- kkirsche 11y agoId probably look at Varnish Cache and see where that gets you. Not sure if that's a proxy or a reverse though
- venning 11y agoSee also Gitter's excellent Tentacles [1] and Tentacles-Streams [2] for a GitHub driver with caching semantics, which I believe they use in production. [1] https://github.com/gitterHQ/tentacles https://github.com/gitterHQ/tentacles [2] https://github.com/gitterHQ/tentacles-streams https://github.com/gitterHQ/tentacles-streams