Google Places API Results Caching

I am creating a mobile application that lists messages, each post has a place attached to it.

I want the list to be able to show the distance from the user's location. without caching anything that would be required to store a location link for each message, and listing the location geometry from the Google Places API, this sounds like a very bad idea.

I was able to save the place id, link, name and geometry in my db and pass it using my API? it is only for performance purposes

Another implementation may be to cache this data in a local sqlite database on a mobile device, but then the user will have to download information for each undisclosed location, so for a list of X different places, the client will make X api calls, sounds slow and battery loss.

Am I allowed to have a central cache in my db in a table that will be updated every time and evicted if it will not be available if you say 30 days?

+6
source share
1 answer

The Google Places page indicates that caching of the place identifier is allowed.

In terms of 10.5.d , it states that you can store a limited amount of content for up to 30 calendar days for performance reasons. Since this is what you are trying to do, I would expect it to be convenient for you to store the identifier, location, and name.

When you start caching additional information, you violate the terms of the API. It is not clear what it is, but I think that as long as you are rational, then you will be fine.

+3
source

Source: https://habr.com/ru/post/917111/


All Articles