Skip to content

Commit

Permalink
Fix cache updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Dec 10, 2022
1 parent 5e6761c commit 4b9ff1b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/org/traccar/session/cache/CacheManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,15 @@ public <T extends BaseModel> void updateOrInvalidate(boolean local, T object) th
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) {
Expand Down

0 comments on commit 4b9ff1b

Please sign in to comment.