Caching Strategies

Difficulty: Intermediate

Question

Explain Cache-Aside vs. Write-Through caching.

Answer

**Cache-Aside**: App checks cache; if miss, loads from DB and updates cache. **Write-Through**: App writes to cache and DB simultaneously. Cache-aside is more resilient to cache failure.

Concepts covered

Cache-Aside, Write-Through, Write-Behind, Read-Through