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

Tile cache doesn't work if the URLs vary #29

Closed
Danstahr opened this issue Sep 17, 2014 · 2 comments
Closed

Tile cache doesn't work if the URLs vary #29

Danstahr opened this issue Sep 17, 2014 · 2 comments

Comments

@Danstahr
Copy link
Contributor

Currently, the Tile Cache is based on the URL of the image inside. This doesn't work well for cases where the URL can vary, for example if there are multiple instances of the server and the URLs are distributed randomly between them (like s1.maps.example.com and s2.maps.example.com).

This can be handled in the Factory Info (so that it always returns something like (x + y) % number_of_servers), but I think the cache shouldn't rely on uniqueness of the URLs and instead should be based on the X, Y, zoom and mapId fields.

@msteiger
Copy link
Owner

Yeah, the whole solution in general is not ideal for this scenario. I'll have to think a bit more on that, but it'll probably be a regex to match the server URL.

A proper solution would be to activate the caching only for those few connections that load tiles. If you're up for implementing that, let me know (PR).

@msteiger
Copy link
Owner

Yay! Took me only 3,5 years to fix this issue.

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

2 participants