Huge number of duplicate queries to admin User table #6292
-
Description:I notice that within any given Nova request lifecycle, the same query select * from `admins` where `id` = ? limit 1Gets run a huge number of times, which appears totally unnecessary. The table Surely within the confine of a single request lifecycle, once the Nova user has been accessed once from the database, there is no need for subsequent authorization attempts to query the DB again? Once you have an authorized User model, why not hold it in memory and use it for the rest of the application request lifecycle? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
A page load in Laravel Nova will contain multiple small XHR requests to load the necessary information needed to populate the requested page, and each request will need to authenticate the current user. If that the case then this is to be the expected behavior. |
Beta Was this translation helpful? Give feedback.
A page load in Laravel Nova will contain multiple small XHR requests to load the necessary information needed to populate the requested page, and each request will need to authenticate the current user. If that the case then this is to be the expected behavior.