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

Cache worlds list to check #9

Open
renatorib opened this issue Apr 3, 2015 · 3 comments
Open

Cache worlds list to check #9

renatorib opened this issue Apr 3, 2015 · 3 comments

Comments

@renatorib
Copy link
Contributor

All highscores calls result in two tibia.com requests, one for check world, other to get highscore.
We can reduce execution time in 50% caching worlds list from worlds and when need to check if a world exists, check in this array. Considering that it is not normal to have new worlds, we can cache for 24 hours or more.

@gpedro
Copy link
Member

gpedro commented Apr 3, 2015

👍

we love PR

@renatorib
Copy link
Contributor Author

I can do it later if I have free time.

@ranisalt
Copy link
Contributor

ranisalt commented Apr 4, 2015

I see no point in caching the results. This is how a crawler works, always get the bleeding edge data even if it doesn't change for a long period. But I think there is a problem in making those double requests, we can skip the first (to check if the world exists) and just try to get the world highscores, and let it scream if the world doesn't exists normally. What do you think?

PS: Whoever made this highscore function got it completely out of code style standards, please fix it.

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

3 participants