Replies: 1 comment 2 replies
-
It looks like Alternatively, I can just use |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using TanStack Query in my webapp to wrap all of my REST API calls, and this is working great.
One thing I'd like to be able to do is support the HTTP Cache Groups proposal. Basically this means that some API calls will indicate that the returned resource belongs to one or more "Cache Groups", and other API calls can indicate that certain "Cache Groups" should be invalidated.
I can already achieve this using the query keys, but the query key needs to be known before the API call is made, whereas the cache groups here are only known based on the response.
It seems to me that I can achieve this if I can:
I can do this with an external store easily enough, but that just feels very hacky and not a good solution.
Is there anything like this that can be done right now within TanStack Query itself?
Cheers
Beta Was this translation helpful? Give feedback.
All reactions