Closed ruudk closed 6 years ago
I use the HTTPlug's cache plugin to make sure I do not use as many HTTP requests to Google. By introducing some more logic to this CacheProvider will make it more useful. HTTPlug has no change to "trim" the query like this.
Big đź‘Ť
We're using Geocoder and we love it!
Since Google is going to charge a lot of money for their Google Maps api we were looking into ways to reduce our API calls.
We do a lot of reverse queries (lat/long to city/country) and want to cache these queries with less precision. For example
52.3705273, 4.891031
could be cached with a precision of 4 decimals:52.3705, 4.8910
Our plan is to change the CachePlugin so that it takes a
precision
parameter in it's constructor. Then update the Symfony bundle to addcache_precision
. Then change thegetCacheKey
to this:Would this be something you would accept? If so, we create the PR :)