From 65d3654dcca878cfd839e40c0dd020da199be09e Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 8 Jun 2022 08:14:20 -0700 Subject: More cache improvements --- src/main/java/org/traccar/api/BaseObjectResource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/org/traccar/api') diff --git a/src/main/java/org/traccar/api/BaseObjectResource.java b/src/main/java/org/traccar/api/BaseObjectResource.java index c033fbb62..eb1db5e89 100644 --- a/src/main/java/org/traccar/api/BaseObjectResource.java +++ b/src/main/java/org/traccar/api/BaseObjectResource.java @@ -106,7 +106,7 @@ public abstract class BaseObjectResource extends BaseResour new Columns.Exclude("id"), new Condition.Equals("id", "id"))); } - cacheManager.updateOrInvalidate(baseClass, entity.getId()); + cacheManager.updateOrInvalidate(entity); LogAction.edit(getUserId(), entity); @@ -135,7 +135,7 @@ public abstract class BaseObjectResource extends BaseResour } else { storage.removeObject(baseClass, new Request(new Condition.Equals("id", "id", id))); } - cacheManager.updateOrInvalidate(baseClass, id); + cacheManager.invalidate(baseClass, id); LogAction.remove(getUserId(), baseClass, id); -- cgit v1.2.3