But that still means the route itself will potentially refetch data the client already knows.
Imagine a situation like this:
I have two complex pages, While they are different routes /foo and /bar there is one incredibly complex and time consuming query shared between them, and this query is complex and determined by state or query parameters but not a uri slug.
On the backedn page RSC async component for both /foo and /bar it will prefetch the queries to hydrate the react-query client in both components with hte initial data for fast loads. However if I navigate from /foo to /bar via client side navigation, /bar will still hit the RSC with the same parameters /foo already fetched, and will return /bar after the query completes. If I knew this was happening due to client side navigation and not initial page load, I could skip the fetch in /bar because I know on the client it would have the cached data from /foo
I am relatively new to nextjs but this seems like a pretty standard problem. I don't want to pre-emptively fetch or cache this data ahead of time because its very expensive to run, so I onlny want it run when it needs to be which would be on initial load.
Asssuming I did want to do what you are positing, how would I do that? I am strugglign to figure out how to make nextjs cache a very dynamic route with very dyanmic parameters outside the uri (we use search params thrown into cookies so a layout component has access to them, which is anti-pattern but was another glaring omision by nextjs)