Closed deadcoder0904 closed 3 months ago
i was getting lots of requests for a session that won't change on my dashboard when i switched between 3 tabs.
session
ideally, it should only request session 1 time but it requested 3 times.
so i asked chatgpt for optimization & it found one:
export const getPageSession = cache(async () => { const authRequest = auth.handleRequest("GET", context) const session = await authRequest.validate() return session })
i checked it & it does send only 1 request.
using next.js example btw :)
Gonna close these since all examples have been rebuilt for v3
i was getting lots of requests for a
session
that won't change on my dashboard when i switched between 3 tabs.ideally, it should only request session 1 time but it requested 3 times.
so i asked chatgpt for optimization & it found one:
i checked it & it does send only 1 request.
using next.js example btw :)