loopprep

Persistent LRU Cache

total 00:00
Hard50 minPremium Asked at Anthropic

    Build an LRU cache, expose its recency order, then make it survive a restart: snapshot and restore in memory, save and load from disk, and resize a live cache.

    The five steps
    1. The cache 10 min
    2. Expose the recency order 8 min
    3. Snapshot and restore 10 min
    4. Survive the process 10 min
    5. Resize and read-through 10 min