cityofcapetown / cape-of-good-place-names

Geospatial utility service developed as a shared iniative between the Western Cape Provincial Government and the City of Cape Town
MIT License
0 stars 1 forks source link

Geocoder (+other paths?) Cache #9

Closed Gordonei closed 2 years ago

Gordonei commented 4 years ago

Although the ambition of this service is to be stateless, a little bit of memorisation never hurt anyone. Headline is that before making expensive calls to the external geocoding service, we should check a local cache to see if we've asked for the same (or similar - pretty dangerous) address.

Cache entries should have some sort of defined lifetime, probably of the order of a few months, which is roughly the rate at which the very best geocoding services are likely making the most significant changes to their data.

Gordonei commented 2 years ago

Initial implementation added in this commit