Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching request responses to prevent hitting rate limits #61

Closed
hedyhli opened this issue Jul 23, 2020 · 6 comments · Fixed by #97
Closed

Caching request responses to prevent hitting rate limits #61

hedyhli opened this issue Jul 23, 2020 · 6 comments · Fixed by #97
Labels
enhancement New feature or request good first issue Good for newcomers to try

Comments

@hedyhli
Copy link
Owner

hedyhli commented Jul 23, 2020

Description

GitHub API has rate limits, and sometimes when using starcli it takes up to 10+ secs to see the output, we should cache the responses based on options (like topic/stars/dates etc) somewhere so that when the user uses the same options again within say 1 minute, it can just fetch the cached info instead of sending the request again

Why is it necessary? (or how would it make it better)

This improves the execution speed/performance

how do you think should it be implemented? (If possible)

Every time search is called we cache the response together with the options used, so when the same options are used again we output the cached data instead

@hedyhli hedyhli added enhancement New feature or request good first issue Good for newcomers to try labels Jul 23, 2020
@hedyhli hedyhli added the help wanted Extra attention is needed label Jul 26, 2020
@shivam212
Copy link
Contributor

Caching could be done, but how should we implement it, would simple caching in form of a text file be ok, or would we want something like redis?

@hedyhli
Copy link
Owner Author

hedyhli commented Aug 1, 2020

I think a html/json/xml file will be ok, we should implement caching after #68 is implemented because this will probably take longer to work out what to do

@hedyhli hedyhli removed the help wanted Extra attention is needed label Aug 29, 2020
@grplyler
Copy link

Hi there! I would like to contribute for Hacktoberfest 2020. Is this issue still up for grabs?

@hedyhli
Copy link
Owner Author

hedyhli commented Sep 28, 2020

Yes it's up for grabs, thanks for your interest

@krishnan2098
Copy link

If it is still up for grabs, I'd like to work on it.

@AkashD-Developer
Copy link
Contributor

Hey, @hedythedev I have added a pull request for this issue. Please have a look.
Sorry that I didn't confirm it here first but it seemed that this issue was not solved even after few requests for grabs so thought it will be good to directly create a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers to try
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants