Problem/Motivation
When trying to override the URLs configured for the language.negotiation config targeting a configured domain, the overrides are never loaded. After tracing through the code this appears to be a byproduct of the recent static caching introduced in #3002744: Domain Config Overrides paired with a recursive loading issue for the language negotiation config.
While trying to load the config override for language.negotiation, the context initiation is triggered which eventually recurses back to this method again with the domain unset. At this level a result of no overrides is stored for the hashed key. When this config is attempted to be loaded again later, the statically cached key is found with no results, so the overrides are never returned.
Proposed resolution
Identify a flag for this scenario to allow bypassing of the static cache until the language negotiation settings are fully loaded.
Comment | File | Size | Author |
---|---|---|---|
#2 | domain--3004473-2--language-negotiation-overrides.patch | 500 bytes | slucero |
Comments
Comment #2
sluceroI don't expect this is the best solution, and I haven't done any testing of the performance impact it may have relative to the results achieved from #3002744: Domain Config Overrides, but moving the override assignment to only apply when a domain has been identified resolved the issue.
Comment #3
agentrickardThis makes sense, though I also wonder if it offsets most of the performance gains.
That really needs a review from the team that filed the other issue.
Comment #4
agentrickardNo response from the other team. Moving this to testing here: https://github.com/agentrickard/domain/pull/445
Comment #5
agentrickard