Knowledge · frontend

invalidateQueries vs staleTime — reflect my write instantly

Lowering staleTime for instant reflection makes traffic explode. Keep staleTime as a freshness SLA and force a refetch at just that moment with invalidateQueries after a write — why and how

Date
2026-07-25
Reading time
4 min
Confidence
Inferred

Document graph

  • TIL
  • KNOWLEDGE