-
Hi there, Huge RQ fan here, thank you very much for all the work and dedication put into it. Have a quick question. I'm working on a Next app that uses RQ server-side to prefetch certain queries, as described in the docs on Next SSR. It's been working really nicely to set a very generous stale-while-revalidate cache header on the Next handlers, and as long as However, we really don't need such a short staleTime after the initial page load, which made me wonder if there is a clean way to always revalidate queries a single time after initial page load / hydration (regardless of staleTime), but not every time a component is mounted (assuming data is not stale). In my testing trying to find a way to make this work, I could only get the queries to refetch post-hydration by either (A) leaving Thanks in advance for any guidance, and if this isn't possible, I'd love to see it be considered as a future option (if not a default). Sam Aside: The useSWR docs lead me to believe that this is how their SSR/hydration works by default, but I cannot confirm this in practice as I have only used it in a pure CSR context. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
After sleeping on it, it dons on me that perhaps it's really as simple as this?
|
Beta Was this translation helpful? Give feedback.
After sleeping on it, it dons on me that perhaps it's really as simple as this?