mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-20 08:24:16 +00:00
perf[module]: 优化IEntity invalidate接口
This commit is contained in:
@@ -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