This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

kdoon80
kdoon80

I've noticed on every Ajax call I make, the USERS table gets hit when I try Auth:getUser() or Auth::check(). The issue becomes noticeable when having "infinite scrolling" feature on a page! So every time the user loads new contents when scrolling down, I see something like this:

select * from `users` where `users`.`deleted_at` is null and `users`.`id` = '10' limit 1

I thought Auth would hit the session first, but it doesn't look like it. Should I instead use my own session and pass user data instead of calling getUser each time?

chris10207
chris10207

i got the same issue with repeated query to the table Users... yes you can have your own getUser() function that hit the session, then the Auth if no user is found

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.