Derive computed value from multiple query caches that automatically updates when the caches change.
Hypothetical example:
- After opening multiple chats, I will have a query cache for each chat that stores its messages.
- Let's assume I wanted to display the chat message with the newest creation date from all messages in all
messages-${chatId} caches.
I have read about query cache find all (https://tanstack.com/query/latest/docs/reference/QueryCache#querycachefindall), but how can I write this in a way that the computed value automatically updates whenever one of the underlying caches receives new data?0 Replies