No way to know if the data was served from cache. #1984
Replies: 4 comments 9 replies
|
I don’t think so. What do you need it for? |
|
same question here |
|
A cache miss is shown when a query goes into loading state. If you mount a new component and it gets data immediate from the cache, it will be in success state. |
|
Hi @TkDodo. It's a specific case, but I guess this kind of flexibility would benefit developers. |
Uh oh!
There was an error while loading. Please reload this page.
Currently there's no property in the response object which tells me if the data was served from cache or if it had to execute the queryFn to return the response.
IIRC, previous version had an
isCachedflag which provided this information.I tried to use
isFetchedflag. But it's set to true in both cases.Is there something in the response object that can be used to determine if the data was served from cache?
All reactions