diff --git a/orm/src/main/java/com/zfoo/orm/cache/EntityCache.java b/orm/src/main/java/com/zfoo/orm/cache/EntityCache.java index 72ecff7e..e04327ae 100644 --- a/orm/src/main/java/com/zfoo/orm/cache/EntityCache.java +++ b/orm/src/main/java/com/zfoo/orm/cache/EntityCache.java @@ -243,7 +243,6 @@ public class EntityCache, E extends IEntity> imple if (entityDef.isThreadSafe()) { EventBus.asyncExecute(clazz.hashCode(), () -> persistAllBlock()); } else { - var currentTime = TimeUtils.currentTimeMillis(); // key为threadId var updateMap = new HashMap>>(); var initSize = caches.size() >> 2; @@ -253,7 +252,6 @@ public class EntityCache, E extends IEntity> imple if (noNeedUpdate(pnode)) { return; } - pnode.resetTime(currentTime); var updateList = updateMap.computeIfAbsent(pnode.getThreadId(), it -> new ArrayList<>(initSize)); updateList.add(pnode); } @@ -275,7 +273,6 @@ public class EntityCache, E extends IEntity> imple @Override public void persistAllBlock() { - var currentTime = TimeUtils.currentTimeMillis(); var updateList = new ArrayList>(caches.size()); caches.forEach(new BiConsumer>() { @Override @@ -283,7 +280,6 @@ public class EntityCache, E extends IEntity> imple if (noNeedUpdate(pnode)) { return; } - pnode.resetTime(currentTime); updateList.add(pnode); } });