Help understanding caching #1179
-
Beta Was this translation helpful? Give feedback.
Answered by
JoviDeCroock
Nov 25, 2020
Replies: 1 comment 4 replies
-
The default cache will clear the invalidated result while it refetches, this to avoid showing stale data. This can be avoided by using a normalized cache like If you would visit this page twice without a mutation you'd see a cache-hit |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
pattruong
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The default cache will clear the invalidated result while it refetches, this to avoid showing stale data. This can be avoided by using a normalized cache like
@urql/exchange-graphcache
, with a normalized cache you can react to mutation results yourself.If you would visit this page twice without a mutation you'd see a cache-hit