Pick the fix
A news app shows 2-day-old headlines on launch until the user pulls to refresh. What's a good policy?
Hint 1 of 1
Can you show something now and fix it shortly after?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Show cached headlines at once and refresh in the background if fetchedAt is older than 10 minutes
Correct. Fast first paint, and fresh data arrives quickly.
Why not the others?
- B Always wait for the network before showing anything. Slow launch and nothing offline.
- C Delete the cache on every launch. Loses offline support.
- D Refresh only when the user pulls. That's the current problem.