(Re-)Use 'consumer_uuid' request attribute in negotiator

Created on 28 February 2023, over 1 year ago

Problem/Motivation

If \Drupal\consumers\Negotiator::negotiateFromRequest() is called multiple times for the same request (and if the request actually has a consumer ID header) each call will incur a database query to load the respective consumer.

Steps to reproduce

-

Proposed resolution

Since we already store the consumer UUID as a request attribute, we might as well check if the given request already has that set and then early return without (re-)loading the consumer.

Remaining tasks

User interface changes

-

API changes

-

Data model changes

-

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany tstoeckler Essen, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024