diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-03-25 12:43:11 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-03-25 12:43:11 +1300 |
commit | d57d87e6c4f8142fca1b2f173ad5818e92a5c277 (patch) | |
tree | 3ecce3cbf6e1a420dfc9b38c72655defa39922ee /src | |
parent | 3623470f03264378fc69e0b5cd94d5d0c72c64f5 (diff) | |
download | trackermap-server-d57d87e6c4f8142fca1b2f173ad5818e92a5c277.tar.gz trackermap-server-d57d87e6c4f8142fca1b2f173ad5818e92a5c277.tar.bz2 trackermap-server-d57d87e6c4f8142fca1b2f173ad5818e92a5c277.zip |
Invalidate cache on database update
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/database/DataManager.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index 419d5043c..e073f8948 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -350,12 +350,14 @@ public class DataManager implements IdentityManager { device.setId(QueryBuilder.create(dataSource, getQuery("database.insertDevice"), true) .setObject(device) .executeUpdate()); + updateDeviceCache(true); } public void updateDevice(Device device) throws SQLException { QueryBuilder.create(dataSource, getQuery("database.updateDevice")) .setObject(device) .executeUpdate(); + updateDeviceCache(true); } public void updateDeviceStatus(Device device) throws SQLException { @@ -412,12 +414,14 @@ public class DataManager implements IdentityManager { group.setId(QueryBuilder.create(dataSource, getQuery("database.insertGroup"), true) .setObject(group) .executeUpdate()); + updateGroupCache(true); } public void updateGroup(Group group) throws SQLException { QueryBuilder.create(dataSource, getQuery("database.updateGroup")) .setObject(group) .executeUpdate(); + updateGroupCache(true); } public void removeGroup(long groupId) throws SQLException { |