Commit 3494764
committed
fix: resolve race condition in NetworkDataCache with proper LRU implementation
- Replace O(n) array-based LRU with O(1) Map-based LRU using insertion order
- Add stale-while-revalidate pattern for resilience during fetch failures
- Add proper disposal pattern with Symbol.asyncDispose support
- Extract magic numbers into named constants (CACHE_DEFAULTS)
- Add comprehensive metrics tracking (hits, misses, evictions, staleHits)
- Add ensureNotDisposed guard to prevent operations on disposed cache1 parent 27cb401 commit 3494764
1 file changed
+207
-74
lines changed
0 commit comments