aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/session/cache
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-12-10 09:27:17 -0800
committerAnton Tananaev <anton@traccar.org>2022-12-10 09:27:17 -0800
commit4b9ff1bd206adb826262acd4e3daf5c962518d7c (patch)
tree5a8bdd84ac1152fcfb08e8646286f955ab5f07ad /src/main/java/org/traccar/session/cache
parent5e6761cf355110dc91b5bf7847f57570473a19b2 (diff)
downloadtrackermap-server-4b9ff1bd206adb826262acd4e3daf5c962518d7c.tar.gz
trackermap-server-4b9ff1bd206adb826262acd4e3daf5c962518d7c.tar.bz2
trackermap-server-4b9ff1bd206adb826262acd4e3daf5c962518d7c.zip
Fix cache updates
Diffstat (limited to 'src/main/java/org/traccar/session/cache')
-rw-r--r--src/main/java/org/traccar/session/cache/CacheManager.java9
1 files changed, 9 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 dc7382223..9d2350012 100644
--- a/src/main/java/org/traccar/session/cache/CacheManager.java
+++ b/src/main/java/org/traccar/session/cache/CacheManager.java
@@ -227,6 +227,15 @@ public class CacheManager implements BroadcastInterface {
broadcastService.invalidateObject(true, object.getClass(), object.getId());
}
+ if (object instanceof Server) {
+ invalidateServer();
+ return;
+ }
+ if (object instanceof User) {
+ invalidateUsers();
+ return;
+ }
+
boolean invalidate = false;
var before = getObject(object.getClass(), object.getId());
if (before == null) {