Add lru-cache module: LinkedHashMap and hand-rolled DLL LRU, coarse-lock/striped thread-safe variants, broken ReadWriteLock demo, Caffeine reference, 43 tests, JMH harness

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4VQVEJWetTT1dYzyJ
This commit is contained in:
2026-10-29 05:52:27 +00:00
co-authored by Claude Sonnet 5.5
parent 4a376b94e9
commit 0457cf4bfb
31 changed files with 1425 additions and 0 deletions
@@ -0,0 +1,9 @@
8 threads x 60000 ops (80% get / 20% put), capacity 64, 256 keys
================================================================
implementation exceptions wrong values size>capacity seen? invariants post-stress LRU check
SynchronizedLruCache 0 0 no ok ok
ReentrantLockLruCache 0 0 no ok ok
StripedLruCache(8) 0 0 no ok n/a (per-segment LRU)
Hit/miss counts are deliberately not printed: they differ on every run and nothing asserts them.