-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
How to cache a single language? #3860
Comments
Hey there, @stevemao! Hrm, that's an interesting one. Looking at the git blame, think it was @mebeim and myself who appear to have added that to the specification. You raise a good point. I suppose you could download the whole thing, but only extract the bits you're interested in for now? It might be worth doing something about this actually - especially since we're growing both the number of different translations and the number of translated pages. |
The current intended way is indeed downloading the whole archive and extracting only the languages of interest. That "should" clause is not really necessary to comply with, it's just an indication of the expected good behavior for a client. |
I agree with @sbrl when she says we could do something about this. |
@schneiderl's idea is good. It'd also allow us to keep an old archive in the same place, giving clients the time to comply with the new page structure (which we've been discussing for a long time). |
@stevemao I have some good news for you. Since v2.0 (#10555) we support caching for individual languages. This is the updated caching spec If appropriate, it is RECOMMENDED that clients implement a cache of pages. If implemented, clients MUST download the entire archive either as a whole from https://tldr.sh/assets/tldr.zip (Which redirects to https://raw.githubusercontent.com/tldr-pages/tldr-pages.github.io/main/assets/tldr.zip) or download language-specific translation archives in the format Caching SHOULD be done according to the user's language configuration (if any), to not waste unneeded space for unused languages. Additionally, clients MAY automatically update the cache regularly. |
The spec says
But the only asset you can download is tldr.zip, which is an entire archive. Is there anything I miss here?
The text was updated successfully, but these errors were encountered: