Skip to content

Can we cache all the questions? #252

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

Closed
gislu opened this issue Apr 2, 2019 · 3 comments
Closed

Can we cache all the questions? #252

gislu opened this issue Apr 2, 2019 · 3 comments

Comments

@gislu
Copy link

gislu commented Apr 2, 2019

🚀 Feature Proposal

Cache all the questions.

Motivation

Cache all the questions so we can work on these questions offline.

Contribution

I can help to analyze the request in order to build web scraper

@Vigilans
Copy link
Contributor

Vigilans commented Apr 2, 2019

The question is in fact cached (by leetcode-cli), and you can find them in $HOME/.lc/leetcode/cache.

Is there any other inconvenience you find in solving the problems offline?

@gislu
Copy link
Author

gislu commented Apr 2, 2019

Sorry I didn't mean cache it manually.
Right now we can only cache the question we browsered.
Is it feasible to cache all the questions by one time?

@Vigilans
Copy link
Contributor

Vigilans commented Apr 2, 2019

The best way would be to fetch all the question details by one query, but leetcode-cli does not provide such functionality.

A workaround would be to trigger leetcode-cli show <id> -x concurrently, but I don't know its cost and whether it is abuse...If you're of enough interest, you could take a stab at a PR to implement it.

Besides, there are plans to migrate from leetcode-cli to an independent library recently, maybe this functionality could be well implemented there.

@gislu gislu closed this as completed Apr 2, 2019
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

2 participants