diff options
author | Anton Tananaev <anton@traccar.org> | 2022-07-13 17:31:52 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-07-13 17:31:52 -0700 |
commit | a8e38b74e5fc6789676bf35a9b92594a230e3ad8 (patch) | |
tree | eed89969aecd7c9652f8640742530c96a4fc40b3 /src/main/java/org/traccar/api/BaseObjectResource.java | |
parent | 33733f835e88a62c4a5259ab330723b88037adf1 (diff) | |
download | trackermap-server-a8e38b74e5fc6789676bf35a9b92594a230e3ad8.tar.gz trackermap-server-a8e38b74e5fc6789676bf35a9b92594a230e3ad8.tar.bz2 trackermap-server-a8e38b74e5fc6789676bf35a9b92594a230e3ad8.zip |
Avoid broadcast loops (fix #4894)
Diffstat (limited to 'src/main/java/org/traccar/api/BaseObjectResource.java')
-rw-r--r-- | src/main/java/org/traccar/api/BaseObjectResource.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/api/BaseObjectResource.java b/src/main/java/org/traccar/api/BaseObjectResource.java index d10843917..2a3bbe239 100644 --- a/src/main/java/org/traccar/api/BaseObjectResource.java +++ b/src/main/java/org/traccar/api/BaseObjectResource.java @@ -71,8 +71,8 @@ public abstract class BaseObjectResource<T extends BaseModel> extends BaseResour entity.setId(storage.addObject(entity, new Request(new Columns.Exclude("id")))); LogAction.create(getUserId(), entity); storage.addPermission(new Permission(User.class, getUserId(), baseClass, entity.getId())); - cacheManager.invalidatePermission(User.class, getUserId(), baseClass, entity.getId()); - connectionManager.invalidatePermission(User.class, getUserId(), baseClass, entity.getId()); + cacheManager.invalidatePermission(true, User.class, getUserId(), baseClass, entity.getId()); + connectionManager.invalidatePermission(true, User.class, getUserId(), baseClass, entity.getId()); LogAction.link(getUserId(), User.class, getUserId(), baseClass, entity.getId()); return Response.ok(entity).build(); @@ -98,7 +98,7 @@ public abstract class BaseObjectResource<T extends BaseModel> extends BaseResour storage.updateObject(entity, new Request( new Columns.Exclude("id"), new Condition.Equals("id", "id"))); - cacheManager.updateOrInvalidate(entity); + cacheManager.updateOrInvalidate(true, entity); LogAction.edit(getUserId(), entity); return Response.ok(entity).build(); |