报告响应式查询的数量而不是传统缓存

This commit is contained in:
YHH
2025-10-11 18:44:55 +08:00
parent 23d81bca35
commit 942043f0b0
2 changed files with 10 additions and 6 deletions

View File

@@ -756,11 +756,13 @@ export class QuerySystem {
/**
* 清理查询缓存
*
*
* 用于外部调用清理缓存,通常在批量操作后使用。
* 注意:此方法也会清理响应式查询缓存
*/
public clearCache(): void {
this.clearQueryCache();
this.clearReactiveQueries();
}
/**
@@ -856,7 +858,7 @@ export class QuerySystem {
}))
},
cacheStats: {
size: this.queryCache.size,
size: this._reactiveQueries.size,
hitRate: this.queryStats.totalQueries > 0 ?
(this.queryStats.cacheHits / this.queryStats.totalQueries * 100).toFixed(2) + '%' : '0%'
}