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

This page is a machine translation of the Korean original. Read the original

Document graph

Related documents

Documents that mention this

Related TIL

Related Knowledge

Tags

react-querycachingoptimistic-uidata-fetchinginvalidation