Is it possible to provide a custom function to determine whether a query response can be stale? #4197
-
I am interested in using query to resolve server-side Objects; however, my application data is primarily encoded within objects that are only updated once in their lifetime and subsequently immutable: a user creates a "Request" Object and polls for a result until the server fulfills the Object. Is there any way I can leverage query for retry/caching throughout the bulk of my application whilst also marking fulfilled requests as "permanently fresh"? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You should be able to set |
Beta Was this translation helpful? Give feedback.
You should be able to set
staleTime: Infinity
. Remember to set yourcacheTime: Infinity
as well if you want the data in cache to not be garbage collected as well.