Architecture in Motion · Episode 018
One quantity change. Why does the cart keep loading?
Asha changes quantity from 1 to 2. She expects the quantity and total to refresh. Follow the normal save/read flow, then see why other shoppers' abandoned copies can pressure the shared Java memory.
Illustrative entry counts only. No real JVM, Caffeine cache or durable database is connected. Counts cannot predict heap bytes, GC pauses, latency or production gains.
Who keeps the old copies alive?
Select a component to see its responsibility.
Visual replay only; motion does not add entries.
Temporary copies in memory: copies
Separate capacity exercise: arrivals versus maximum entries
This separate idealized map exercise does not change the six-step story. Caffeine maintenance can be asynchronous; maximumSize is not a strict instantaneous physical heap boundary.
What changes in Java 21?
This is an application retention problem, not a new Java 21 collector feature. Java 21 includes GC and JFR, but changing collector or increasing heap does not break a live map reference. The runnable teaching map uses Java 17+; the separate Spring/Caffeine fragment needs its framework dependencies.