- Laravel Version: 10.48.3
- Nova Version: 4.33.0
- PHP Version: 8.3.0
- Database Driver & Version: MySQL 8
Description:
I notice that within any given Nova request lifecycle, the same query
select * from `admins` where `id` = ? limit 1
Gets run a huge number of times, which appears totally unnecessary. The table admins is the table I have my Nova users on.
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?