question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide a caching GitHubAPI mixin

See original GitHub issue

Using 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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dstufftcommented, Apr 26, 2017

You might consider depending on cachetools for this.

0reactions
brettcannoncommented, May 15, 2017

@dstufft about (3), I would expect to cache every GET request with no body in GitHubAPI._make_request() and send the appropriate If-None-Match and If-Modified-Since headers down through GitHubAPI._request() and catch the 304 response (as well as cache any results).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found