PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Anthropic

Design a Crash-Resilient LRU Cache

Last updated: Apr 18, 2026

Quick Overview

This question evaluates a candidate's competency in designing a crash-resilient LRU cache, including which data and ordering must be persisted, durability and recovery concerns, and trade-offs between latency and persistence.

  • hard
  • Anthropic
  • System Design
  • Software Engineer

Design a Crash-Resilient LRU Cache

Company: Anthropic

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

You have an in-memory LRU cache with fixed capacity and standard `get(key)` / `put(key, value)` operations. Normally, an LRU cache is volatile, but now you want the cache to recover useful state after a process crash or restart. Design a persistence strategy for this cache. Discuss: - What data must be persisted. - How to reconstruct both the key-value entries and the LRU ordering. - Whether to use snapshots, a write-ahead log, or both. - The trade-off between durability and latency. - How recovery should work after a crash.

Quick Answer: This question evaluates a candidate's competency in designing a crash-resilient LRU cache, including which data and ordering must be persisted, durability and recovery concerns, and trade-offs between latency and persistence.

Related Interview Questions

  • Design a one-to-one chat system - Anthropic (medium)
  • Design One-to-One Chat - Anthropic (medium)
  • How to stream a large file to 1000 hosts fastest - Anthropic (medium)
  • Design guardrails and fallback for LLM reliability - Anthropic (hard)
  • Design a Concurrent Domain Crawler - Anthropic (hard)
Anthropic logo
Anthropic
Jan 6, 2026, 12:00 AM
Software Engineer
Technical Screen
System Design
32
0

You have an in-memory LRU cache with fixed capacity and standard get(key) / put(key, value) operations. Normally, an LRU cache is volatile, but now you want the cache to recover useful state after a process crash or restart.

Design a persistence strategy for this cache.

Discuss:

  • What data must be persisted.
  • How to reconstruct both the key-value entries and the LRU ordering.
  • Whether to use snapshots, a write-ahead log, or both.
  • The trade-off between durability and latency.
  • How recovery should work after a crash.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Anthropic•More Software Engineer•Anthropic Software Engineer•Anthropic System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.