Comments (6)
Here is another octokit.net discussion about my thoughts on implementing ETag/caching support.
octokit/octokit.net#1636 (comment)
From my perspective I prefer the idea of exposing the necessary information to consumers (eg a way for them to know what the ETag of a response was, and a way to provide that ETag or a timestamp on a call) and let them use them as they see fit, as opposed to "magic" internal workings that automatically cache responses and use ETags internally without the user knowing about it etc.
I also prefer the idea of returning a blank collection when the 304 response is received, rather than returning a cached response - again because I feel like octokit is an API wrapper and not an actual application layer itself
from discussions.
Not a maintainer but I found some links related to octokit.net that might be useful
- A PR to implement caching based on ETags
- Caching plugin for Octokit.net
- Unfinished conversation about baking cache support into Octokit.net
from discussions.
šÆ to providing helper methods to make it easy to do pagination, caching, and handling rate limit responses, etc. I'd rather not do it transparently, for all the reasons @ryangribble mentions.
from discussions.
If you add transparent handling of caching, you should not preclude consumers opting out and handling it themselves... or provide a cache-provider plug-in api (so consumers can serialize/persist the cache in whatever form they want... be it memcache, json files, etc)
from discussions.
My current idea is to make an official plugin that people can use, but can replace with their own. But Iām curious to hear what maintainers of octokit.net & octokit.rb have worked out
from discussions.
Would love to see this feature implemented! Exposing this in ApiOptions alone should be the way. Agreed that it should be an Api Wrapper, not an Application Layer.
Common features that sit on top of OctoKit.Net such as adding extension methods that cache this stuff in appointed repos is how I'd see this going.
from discussions.
Related Issues (20)
- Maintainers sync - Nov 29 2017
- How to handle 2FA authentication? HOT 9
- Get archive link API: return URL or full archive content? HOT 4
- v3 REST API documentation: Upload release asset HOT 5
- v3 REST API docs: inconsistencies in notifications_url URI templates HOT 8
- v3 REST API: Inconsistencies in DELETE endpoints with request bodies HOT 2
- GitHub-specific URI template parsing HOT 14
- v3 REST API: replace :varname with {varname} in endpoint route docs HOT 2
- Inconsistency in issue label endpoints in rest.js HOT 2
- Inconsistency in Lists of Official Libraries HOT 2
- Suggestion: show some metadata in list of third-party libraries HOT 1
- Include a Python library HOT 1
- How to handle "ENOTFOUND api.github.com" responses HOT 1
- GraphQL & query injection attacks
- Should this repo be archived? And migrate open issues to GitHub Discussions? HOT 3
- Where to direct support requests HOT 2
- Best practices for making it easy for contributors to run tests HOT 18
- Transition plan for node-github HOT 25
- Webhook support in octokit.js HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discussions.