Daily iOS
iOS system design

Offline-friendly finance feature

Design the "this month's spending and remaining limit" card in a credit card app. The screen has to open even on a flaky network, and the data has to feel fresh. Focus on what you cache and when you trust local data.

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Read-only data is shown stale-while-revalidate, cached value first and refreshed in the background, but every amount is stored and displayed with its asOf time. Writes are either blocked offline or go through an outbox with an explicit "pending" state. On conflict the server always wins and the client reverts.

Share a question