Pattern 07 / CACHE
Cache-Aside (Lazy Loading)
Use this when avoiding repeated database reads for frequently requested data.
- Pressure
- Avoiding repeated database reads for frequently requested data
- Mechanism
- The app checks cache first, loads from the database on miss, then stores the result for later
- Toll
- First request is slow and cache invalidation must be handled carefully
