jenkins-bot has submitted this change and it was merged.

Change subject: Add comments for ParserOptions::getUserLang regarding cache 
split
......................................................................


Add comments for ParserOptions::getUserLang regarding cache split

Add details in comments for ParserOptions::getUserLang, more
explicitly warning about cache fragmentation and mention that
in some cases (e.g. multilingual wiki) this might be desired.

Change-Id: I3fe0799ade488eca32d8c89150179710309650c3
---
M includes/parser/ParserOptions.php
1 file changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Daniel Kinzler: Looks good to me, approved
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/parser/ParserOptions.php 
b/includes/parser/ParserOptions.php
index 100656d..ed0d74a 100644
--- a/includes/parser/ParserOptions.php
+++ b/includes/parser/ParserOptions.php
@@ -372,13 +372,15 @@
        }
 
        /**
-        * Get the user language used by the parser for this page.
+        * Get the user language used by the parser for this page and record the
+        * userlang parser option, which splits parser cache.
         *
         * You shouldn't use this. Really. $parser->getFunctionLang() is all 
you need.
         *
         * To avoid side-effects where the page will be rendered based on the 
language
-        * of the user who last saved, this function will triger a cache 
fragmentation.
-        * Usage of this method is discouraged for that reason.
+        * of the user who last saved, this function will trigger a cache 
fragmentation.
+        * For that reason, usage of this method is discouraged unless it is 
desired to
+        * split caches based on user language, such as for multilingual 
content.
         *
         * When saving, this will return the default language instead of the 
user's.
         *

-- 
To view, visit https://gerrit.wikimedia.org/r/232756
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3fe0799ade488eca32d8c89150179710309650c3
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aude <aude.w...@gmail.com>
Gerrit-Reviewer: Daniel Kinzler <daniel.kinz...@wikimedia.de>
Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to