Change record status: 
Project: 
Introduced in branch: 
9.1.x
Introduced in version: 
9.1.0-rc1
Description: 

Page caching is used by the LanguageNegotiationBrowser plugin to overcome the caching problems that occur for sites with multiple languages and browser negotiation enabled.
The workaround currently employed is to disable the internal page cache by using the 'page_cache_kill_switch' service when calling the ::getLangcode() method. This service was called in a static way.

The LanguageNegotiationBrowser class now implements the ContainerFactoryPluginInterface to allow factory-based instantiation.
During instantiation the 'page_cache_kill_switch' policy is injected into the plugin.

N.B.: This will eventually be solved more elegantly in #2430335: Browser language detection is not cache aware.

Impacts: 
Module developers