Live page fetching over https #32
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
girlnamedzero/cldr#32
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
To elaborate, the offical tldr clients fetch pages live, caching them locally only after you've downloaded them for the first time.
Currently, cldr will only download the entire database locally, opting to fetch pages from the local storage, this approach has numerous performance benefits over live https fetches. But has the downside of storing roughly 20MB (for the english pages), and needing to update the database occasionally.
I'd like to have the option to make live fetches, however, it should not be the default.
Ideas for implementation:
We could search the local db first, and if a page is not found, try over https.
Alternatively, or additionally, we could have a parameter/environment variable telling the program to prioritize live and fallback to local, something like: --live, and TLDR_FETCH_PRIORITY=[live/local], setting it to local would do nothing