Invalidate React Query on SSR Next JS (App Router)
I have a API that fetches me list of products.
I am using SSR react query to cache the response
my common queryClient file
and page where I am fetching the products
But my main issue is, when the Backend Data change, It takes upto 10 mins to update the data on frontend to validate it.
How can I clear the cache on server side from backend?
I tried create a api route in nextjs and create a POST API
But this doesn't work either.
The I replaced my getQueryClient Function with this as well
which didn't helped either.
Please suggest something that would help me, or would I need to remove the SSR from frontend?
