diff options
author | Anton Tananaev <anton@traccar.org> | 2023-12-23 07:02:22 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-12-23 07:02:22 -0800 |
commit | 5cebbfccae29dad81d89591a798d6aa29dd42b75 (patch) | |
tree | 81fee51c44624f6c6d8a1bda5d826dc4b7242129 /src/main/java/org/traccar | |
parent | c165968c2eb24b1c4a35dab39174b4df3576551c (diff) | |
download | trackermap-server-5cebbfccae29dad81d89591a798d6aa29dd42b75.tar.gz trackermap-server-5cebbfccae29dad81d89591a798d6aa29dd42b75.tar.bz2 trackermap-server-5cebbfccae29dad81d89591a798d6aa29dd42b75.zip |
Initialize position cache
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r-- | src/main/java/org/traccar/session/cache/CacheManager.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/session/cache/CacheManager.java b/src/main/java/org/traccar/session/cache/CacheManager.java index 918c97c66..bb9b4c995 100644 --- a/src/main/java/org/traccar/session/cache/CacheManager.java +++ b/src/main/java/org/traccar/session/cache/CacheManager.java @@ -157,6 +157,10 @@ public class CacheManager implements BroadcastInterface { new Columns.All(), new Condition.Equals("id", deviceId))); graph.addObject(device); initializeCache(device); + if (device.getPositionId() > 0) { + devicePositions.put(deviceId, storage.getObject(Position.class, new Request( + new Columns.All(), new Condition.Equals("id", device.getPositionId())))); + } } } finally { lock.writeLock().unlock(); |