Replies: 1 comment
-
you should be able to do that manually with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a use case where I want to get a subset of users' data in a batch, so that I can avoid 20+ parallel queries. However, which users are included in the subset will change frequently with a lot of overlap. Users will probably include or exclude one user from the table at a time. If I use the array of user ids as the query key, it would result in a lot of extra batch queries when theoretically a lot of the users' data already exists in the cache. I'm looking for a way to make a batched initial query that includes all needed users initially, and then future batch queries would only get users that aren't already cached.
Is there a way I could do some logic in the batch queryFn to check if each user already exists in the cache and only query those that i need? If so, is there a way I can set each user's data in the cache when I get a batch of users back?
Beta Was this translation helpful? Give feedback.
All reactions