Skip to content

Commit 58ab7cb

Browse files
DaMandal0rianclaude
andcommitted
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 cache 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 27cb401 commit 58ab7cb

File tree

1 file changed

+207
-74
lines changed

1 file changed

+207
-74
lines changed

0 commit comments

Comments
 (0)