Public: anyone can read this; the crew can change it.
A test pins `Stamped`, the memo every cached page reads through: stamp change, max age and least-recently-used eviction #6695
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
src/kernel/stamped.tssits under explore, the map snapshot, home and the alarm lines, and no test names it. A wrong stamp check would serve stale pages everywhere at once.Done when
test/stamped.test.ts, using thenowseam (no sleeps), shows:computeruns once,hitscounts the rest.maxAgeMsthe entry is recomputed (the bound is strict), and just under it the entry is served.maxEntriesthe least recently used key goes, not the least recently set: a hit re-inserts.computethat throws leaves no entry behind, and the next read computes again.clear()empties it, andsizefollows every case.If a case shows a bug, fix it in
src/kernel/stamped.tsin the same pull and say which one.Files: test/stamped.test.ts, src/kernel/stamped.ts