Provide a caching GitHubAPI mixin
See original GitHub issueUsing ETag
and Last-Modified
, a mixin which overrides abc.GitHubAPI._request()
could pass in the appropriate headers and catch a 304
status code to return a cached result. This should only be used on GET
with no body
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
prototype-berlin/loopback-mixin-cache - GitHub
Contribute to prototype-berlin/loopback-mixin-cache development by creating ... loopback-mixin-cache adds easy to use redis caching to any of your models.
Read more >Wiredcraft/loopback-cache - GitHub
To use the redis backend, setup a model using the redis connector or the ioredis connector and use the mixin CacheModel with the...
Read more >How to cache RetrieveModelMixin with persistent cache #8521
Accessing a single method will call the retrieve function thanks to mixins.RetrieveModelMixin . I would like to speed up the function since it...
Read more >synapsemx/loopback-jsonapi-redis-mixin - GitHub
Mixin for Loopback that provides a Redis cache using the JSON API payload format. Builds on these great packages:.
Read more >What's the best approach for mixing API responses into one ...
It's perfectly fine to manipulate the react-query cache by something you get via the websocket. After all, it should be the same as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You might consider depending on cachetools for this.
@dstufft about (3), I would expect to cache every GET request with no body in
GitHubAPI._make_request()
and send the appropriateIf-None-Match
andIf-Modified-Since
headers down throughGitHubAPI._request()
and catch the304
response (as well as cache any results).