From df65b06ad4a7d072f1affb837733cebc7058c2c0 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Thu, 11 Jan 2018 14:28:02 +0500 Subject: Update group and device cache on group delete. --- src/org/traccar/database/DeviceManager.java | 2 +- src/org/traccar/database/GroupsManager.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/database') diff --git a/src/org/traccar/database/DeviceManager.java b/src/org/traccar/database/DeviceManager.java index cb410b7c0..4c329786f 100644 --- a/src/org/traccar/database/DeviceManager.java +++ b/src/org/traccar/database/DeviceManager.java @@ -65,7 +65,7 @@ public class DeviceManager extends BaseObjectManager implements Identity refreshLastPositions(); } - private void updateDeviceCache(boolean force) throws SQLException { + public void updateDeviceCache(boolean force) throws SQLException { long lastUpdate = devicesLastUpdate.get(); if ((force || System.currentTimeMillis() - lastUpdate > dataRefreshDelay) && devicesLastUpdate.compareAndSet(lastUpdate, System.currentTimeMillis())) { diff --git a/src/org/traccar/database/GroupsManager.java b/src/org/traccar/database/GroupsManager.java index c0456085b..c1a07a498 100644 --- a/src/org/traccar/database/GroupsManager.java +++ b/src/org/traccar/database/GroupsManager.java @@ -47,7 +47,7 @@ public class GroupsManager extends BaseObjectManager implements Managable } } - private void updateGroupCache(boolean force) throws SQLException { + public void updateGroupCache(boolean force) throws SQLException { long lastUpdate = groupsLastUpdate.get(); if ((force || System.currentTimeMillis() - lastUpdate > dataRefreshDelay) && groupsLastUpdate.compareAndSet(lastUpdate, System.currentTimeMillis())) { -- cgit v1.2.3