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 Nominatim geocoding API #13

Closed
laurin opened this issue Feb 26, 2022 · 1 comment
Closed

Cache Nominatim geocoding API #13

laurin opened this issue Feb 26, 2022 · 1 comment

Comments

@laurin
Copy link
Contributor

laurin commented Feb 26, 2022

As getting the latitude and longitude of the found location seems to be the most time-consuming operation, it would probably make sense to cache the responses of the Nominatim API.

@kinshukdua
Copy link
Owner

You're right, the quickest solution is to create a function that just calls the Nominatim API and wrap it with @cache but this would only work for a single execution of the script. The second way is to store the lat and long of the city into a database and update that accordingly and I think this is probably the best solution.

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