I have a multilingual site where I use in most of my custom modules (.module files) and in the mycustomtheme.theme file these lines of code :
I want to install Varnish on my site, and I know that I can specify some URLs not to be cached like for instance I specified the path of a custom controller where
\Drupal::languageManager()->getCurrentLanguage()->getId(); is used so that the page related to this controller is not cached. However, I don't know what to do for all the .module files where I used this line of code. Does this function
->getCurrentLanguage()->getId(); have a specific path so that I can specify its path to be ignored by varnish ?
PS: this is important because some features differ from one user to another depending on the website's language.