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
LBS location cache #4407
base: master
Are you sure you want to change the base?
LBS location cache #4407
Conversation
Please provide some information on how it's better than current cache. |
@tananaev Is there any cache? After ~2-3 weeks of just one device sitting in my home (without GPS), sending location updates every 3 minutes, I got a bill for ~$30 for google location services. This is just a quick in-memory cache for devices that are missing GPS signals but are still regularly sending LBS/wifi updates. |
So, you have changed the code without noticing that there is already an in-memory cache available? |
You mean a cache for LBS locations? No, I haven't noticed that. |
Sorry, it's available for geocoding, but I don't think we should use entirely different solution for geolocation. |
I wanted to have a quick working solution before the bill from Google ruins me :) |
It's an LRU cache. |
OK, now I see it. |
Why you dont use a mozila LBS for free ? |
When a device is out of GPS range (e.g. in a garage) it will send LBS location. Traccar will query the external service (Google API) to locate it with every packet, which is inefficient and can be costful.
This PR adds a simple ehcache-based cache of LBS locations.
Closes #3790