Effect Segmented LRU Cache
The eviction policy that survives a table scan. A plain LRU treats a one-touch batch job like real traffic, so a single sequential scan marches every hot key out of the cache and the next minute is all misses. Segmented LRU admits new keys to a probation segment and only promotes to protected on a second hit, so scan keys live and die in probation without displacing anything hot, while quiet protected keys demote back so squatters age out. The demo plays a 100-key scan against 4 twice-touched hot keys: plain LRU loses all 4, segmented LRU keeps all 4. Pinned to effect 4.0.0-beta.98.
npx shadcn@latest add @compronents/effect-lru-cache-evictionInstalls from ui.aryank.space. Needs a registry token and a one-time @compronents entry in components.json. The docs walk through both.
A 100-key batch scan marches every hot key out of a plain LRU. One-touch cold keys are treated exactly like real traffic, so the next minute is all misses.