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

a little cache for web page translation? #52

Open
3 tasks
unhammer opened this issue Feb 1, 2017 · 1 comment
Open
3 tasks

a little cache for web page translation? #52

unhammer opened this issue Feb 1, 2017 · 1 comment

Comments

@unhammer
Copy link
Member

unhammer commented Feb 1, 2017

Some normal pages take up to 30s to translate with the giellatekno pairs.

Maybe we should try having a little
{ pair : { url : translationOutput } }
? Just for the slashdot effect where one page gets requested again and again.

Seeing as caching is Hard, we could keep it simple and just empty it when sys.getsizeof > max_url_cache. But sys.getsizeof doesn't recursively follow the size of the object; also, news sites etc. change, so I added a stupid simple "empty if older than two hours" rule for the whole cache object.

TODO:

@unhammer
Copy link
Member Author

(The giellatekno branch has been using this for some years now, may very well be mergable.)

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

No branches or pull requests

2 participants