useful-forks / useful-forks.github.io

Improving GitHub's Forks list discoverability through automatic filtering. The project offers an online tool and a Chrome extension.
https://useful-forks.github.io/
MIT License
1.18k stars 61 forks source link

[Feature request] Cache results #39

Open matthewruzzi opened 2 years ago

matthewruzzi commented 2 years ago

It would be great if there was a way to cache the results since they take a long time to generate and require a lot of API calls.

payne911 commented 2 years ago

Yeah, I'm aware. The Export CSV button was specifically introduced as a quick-fix to this.

Unfortunately, I'm not entirely sure how to approach this problem given that the tool is ran as a stateless static website (because that is provided for free by GitHub).

matthewruzzi commented 1 year ago

Could the results be cached in the local browser cache?

payne911 commented 1 year ago

Essentially, yes. Maybe octokit somehow already has some caching capability: that would have to be investigated. But all in all, given the limited time I can give to this project, I'm not sure I will personally explore how to implement this feature in the near future. Others are welcome to try, though!

The main use-case I can see this being useful for is when the search ends up being interrupted, and one has to refresh the page to start again: if all calls were cached, it would almost immediately restart from where it left off. This mostly only happens on enormous scans, and would probably represent a decent amount of coding, though.