I have multiple traccar instances running using the same DB in several segregated IP locations, eg. some for the web UI, some for processing protocol clients, all using the same PostgreSQL database.
I have setup some PostgreSQL before insert/update triggers that upon device auto registration fetch some details from another system
and based upon this update eg. the device name, create a traccar group, associate it with some user, and assign the device to the group,, the group to the user etc.
That works nicely so far, but of course the traccar instances pickup those details only after restart.
Is there a way to command the traccar instances to invalidate/refresh their caches?
eg. via
- some lastupdate timestamp columns in tc_devices tc_groups tc_user_group
- pkill -HUP ?
- a simple REST API call ?
++ Does anyone know where in the source to best implement / hook in such a new API call?
++ What must be called in the caching framework to have it invalidate/refresh its cache?
BW
Bruno
There is no web API to invalidate caches, but each manager in the code has methods to invalidate it. So you should be able to implement invalidation with some fairly simple code modifications.
Hi Bruno,
How you installed few instances? I have windows server 2008 R2 OS.
I tried but it didn't worked. I assume need background service for each instance. I don't know how to do it.
Thank you
I have multiple traccar instances running using the same DB in several segregated IP locations, eg. some for the web UI, some for processing protocol clients, all using the same PostgreSQL database.
I have setup some PostgreSQL before insert/update triggers that upon device auto registration fetch some details from another system
and based upon this update eg. the device name, create a traccar group, associate it with some user, and assign the device to the group,, the group to the user etc.
That works nicely so far, but of course the traccar instances pickup those details only after restart.
Is there a way to command the traccar instances to invalidate/refresh their caches?
eg. via
++ Does anyone know where in the source to best implement / hook in such a new API call?
++ What must be called in the caching framework to have it invalidate/refresh its cache?
BW
Bruno