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:
@@ -0,0 +1,15 @@
|
||||
Caffeine 3.3.1 maximumSize(3) given the dry-run operations (same-thread executor, cleanUp after each)
|
||||
====================================================================================================
|
||||
|
||||
put(1,A) -> resident keys (unordered): [1]
|
||||
put(2,B) -> resident keys (unordered): [1, 2]
|
||||
put(3,C) -> resident keys (unordered): [1, 2, 3]
|
||||
get(1) -> resident keys (unordered): [1, 2, 3]
|
||||
put(4,D) -> resident keys (unordered): [1, 2, 4]
|
||||
get(2) -> resident keys (unordered): [1, 2, 4]
|
||||
put(3,C2) -> resident keys (unordered): [1, 2, 3]
|
||||
put(5,E) -> resident keys (unordered): [1, 2, 5]
|
||||
get(4) -> resident keys (unordered): [1, 2, 5]
|
||||
get(1) -> resident keys (unordered): [1, 2, 5]
|
||||
|
||||
A strict LRU of capacity 3 ends this sequence with [3, 5, 4] (see 01-dry-run-capacity-3.txt).
|
||||
Reference in New Issue
Block a user