mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-12 16:15:42 +00:00
perf[module]: 优化IEntity invalidate接口
This commit is contained in:
1 parent
448cc02189
commit
f5c8f3b9ea
1 file changed
+4
@@ -95,6 +95,10 @@ public interface IEntity<PK extends Comparable<PK>> {
|
||||
}
|
||||
|
||||
private void invalidate() {
|
||||
if (empty()) {
|
||||
// 未初始化的对象不允许失效
|
||||
return;
|
||||
}
|
||||
OrmContext.getOrmManager().getEntityCaches(this.getClass()).invalidate(queryId());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user