User data is attached to big requests, and changes via Bearer token. What's best practice?
Unanswered
Tomistoma posted this in #help-forum
TomistomaOP
Hey, first off, been loving next. Ran into a problem I don't know what best practice is.
I have 6 requests to build a page. 98% of the data in these requests are the same for everyone, however, there is a field on each object that is user data. Since this would require cookies, my understanding is that this could never be cached, and thus these requests are slow.
What is the recommened way of fetching this data, then hydrating it again with the user data. I still want the original data to be SSR'd, and the 2% to be appended dynamically based on cookie. Do I need to change my api? What is best practice for next here?
I have 6 requests to build a page. 98% of the data in these requests are the same for everyone, however, there is a field on each object that is user data. Since this would require cookies, my understanding is that this could never be cached, and thus these requests are slow.
What is the recommened way of fetching this data, then hydrating it again with the user data. I still want the original data to be SSR'd, and the 2% to be appended dynamically based on cookie. Do I need to change my api? What is best practice for next here?