Commit f9fa146
committed
fix(config-cache): has() no longer inflates hit/miss stats
has() delegated to get(), which increments this.hits or this.misses.
The common has()+get() pattern double-counted every lookup.
Re-implement has() with its own TTL check so cache statistics stay
accurate.
35 unit tests added including 3 regression tests for this fix.
Closes #4971 parent e9711fa commit f9fa146
3 files changed
Lines changed: 424 additions & 102 deletions
File tree
- .aios-core
- core/config
- tests/core/config
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
76 | 86 | | |
77 | 87 | | |
78 | 88 | | |
| |||
0 commit comments