In my Laravel application I used Auth::user()
in multiple places. I am just worried that Laravel might be doing some queries on each call of Auth::user()
Kindly advice
In my Laravel application I used Kindly advice |
||||
|
No the user model is cached. Let's take a look at
As the comment says, after retrieving the user for the first time, it will be stored in |
|||||
|
For same Request, If you run This cannot be cached for all request after first request has been made due to security point of view. I see use of some session here , http://www.rebootcode.com/php/laravel/using-session-against-authuser-in-laravel-4-and-5-cache-authuser/ Thanks |
||||
|