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

Add a simple file caching to the list of versions #25

Open
0xsouravm opened this issue Sep 3, 2024 · 1 comment
Open

Add a simple file caching to the list of versions #25

0xsouravm opened this issue Sep 3, 2024 · 1 comment

Comments

@0xsouravm
Copy link
Contributor

0xsouravm commented Sep 3, 2024

A simple file cache containing the list of polkadot-sdk and orml crates version stored somewhere in the HOME directory is needed so that the user doesn't have to wait each time they want to list the versions. A boolean flag --cache can be implemented to allow the user to choose if they want to fetch the list from the cached data or they want to fetch it fresh from the GitHub API or CLI, and --update-cache flag to update the cache with a latest fetch from GitHub.

@0xsouravm
Copy link
Contributor Author

0xsouravm commented Sep 6, 2024

@ggwpez This PR #28 adds a local caching mechanism that reduces the fetch time of polkadot-sdk versions exponentially(the list is fetched instantly from the cache). This improvement in time is more than substantial as originally GitHub API/CLI takes about 6-8 seconds to fetch and there is the issue of setting up gh CLI and authenticating it once the rate limit is hit.

This PR provides a seamless way of fetching the versions from the local cache without having to wait or worrying about hitting the rate limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant