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..
2 Replies
next auth is probably making a query on client side
or checking if you are validated on the middleware
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