Closed Maslino closed 6 years ago
So, what solution do you suggest?
It is not client issue. Client only downloads data from source. Low speed of execution is only dues to network interaction. Maybe owner should close this issue?
a page cache may be needed
Yep, I think too. Related issue: https://github.com/tldr-pages/tldr-python-client/issues/15
If only this project was written using Python3, we could have used the in-built cache decorator which would have allowed us to implement caching by literally adding just one line to the source code.
tldr
is not working permanently like a daemon. In other words, anytime you execute tldr command_name
, you have a new instance of application with empty LRU cache. So it won't help.
I think we need to create some dir like ~/.tldr/cache
during installation and store server answers there. And doing requests with If-Modified
header. But answer size is not so big... More time will to take connection to server, than get small text response... We may not to request server each time, but how we can know that our cache is up to date?
So cache is important but I guess not to accelerate each command. Just for case when server is not available.
Good idea! I'll implement it when I get the time.
Implemented in newer versions.
to fetch corresponding page from remote repository every time is very slow.