Skip to content

Huge number of duplicate queries to admin User table  #6291

@matthewjumpsoffbuildings

Description

  • 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions