How to refresh an entry in the cache? #40
Answered
by
bvaughn
nggonzalez
asked this question in
Q&A
-
Hi, what is the best way to refresh an entry in the cache? My specific use case is that I want to refetch the data when the user navigates back to a particular screen. So far I've thought of the following approaches, but could use some guidance:
Thanks for the help! |
Beta Was this translation helpful? Give feedback.
Answered by
bvaughn
Jul 26, 2023
Replies: 1 comment 1 reply
-
This will likely not do anything in terms of scheduling updates or letting React know that the previously cached value is now stale. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
nggonzalez
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
useCacheMutation
is the only recommended way of mutating a cache.This will likely not do anything in terms of scheduling updates or letting React know that the previously cached value is now stale.