Pastakhov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/171200

Change subject: add function Runtime::disableParserCache() (v 3.8.0)
......................................................................

add function Runtime::disableParserCache() (v 3.8.0)

Change-Id: I44f82e6b2c8f04e44ac0910afa143fe5d6b508d8
---
M PhpTags.php
M includes/Runtime.php
2 files changed, 21 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTags 
refs/changes/00/171200/1

diff --git a/PhpTags.php b/PhpTags.php
index bec2830..2acb12a 100644
--- a/PhpTags.php
+++ b/PhpTags.php
@@ -16,7 +16,7 @@
 }
 
 const PHPTAGS_MAJOR_VERSION = 3;
-const PHPTAGS_MINOR_VERSION = 7;
+const PHPTAGS_MINOR_VERSION = 8;
 const PHPTAGS_RELEASE_VERSION = 0;
 define( 'PHPTAGS_VERSION', PHPTAGS_MAJOR_VERSION . '.' . PHPTAGS_MINOR_VERSION 
. '.' . PHPTAGS_RELEASE_VERSION );
 
diff --git a/includes/Runtime.php b/includes/Runtime.php
index b7255ca..f81fd91 100644
--- a/includes/Runtime.php
+++ b/includes/Runtime.php
@@ -737,6 +737,26 @@
        }
 
        /**
+        * Set a flag in the output object indicating that the content is 
dynamic and
+        * shouldn't be cached.
+        * @global \OutputPage $wgOut
+        * @staticvar boolean $done
+        * @return null
+        */
+       public static function disableParserCache() {
+               global $wgOut;
+               static $done = false;
+
+               if ( $done ) {
+                       return;
+               }
+
+               self::getParser()->disableCache();
+               $wgOut->enableClientCache( false );
+               $done = true;
+       }
+
+       /**
         * Increment the expensive function count
         * @param string $functionName
         * @return null

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44f82e6b2c8f04e44ac0910afa143fe5d6b508d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTags
Gerrit-Branch: master
Gerrit-Owner: Pastakhov <pastak...@yandex.ru>

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

Reply via email to