t3 stack, making querries every time i reload the page?

Hi.. It's the first time when I'm using server components, and, decided to go with this stack. My question is, why do i have in console, a log with querry, everytime i reload the page? is it from the auth, and I was wondering, if shouldn't be a performance concerns..
No description
2 Replies
Neto
Neto2mo ago
next auth is probably making a query on client side or checking if you are validated on the middleware
Tim
Tim2mo ago
It’s probably just NextAuth verifying that the user still exists and so on. I’d say cache the SQL for a reasonable time span (I’d say around 15 minutes to 1 hour) and when the password changed or similar invalidate the cache entry
Want results from more Discord servers?
Add your server