Performance: Fetch caching behavior
MEDIUM IMPACT
This affects how quickly data loads on the page and how often the browser or server fetches data again.
const res = await fetch('/api/data', { cache: 'force-cache' }); const data = await res.json();
const res = await fetch('/api/data', { cache: 'no-store' }); const data = await res.json();
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Fetch with no-store cache | Minimal | 0 | Low | [X] Bad |
| Fetch with force-cache | Minimal | 0 | Low | [OK] Good |