Use a low TTL for parser output when special pages are included
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 15 Jun 2016 00:48:04 +0000 (17:48 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 15 Jun 2016 00:48:04 +0000 (17:48 -0700)
Previously, no TTL at all was used, which is quite harsh on
performance and had downstream effects like disabling edit
stashing for affected pages.

Bug: T136678
Change-Id: I2462057aa189cfb05fe65d0b3c081a9fd10066a2

includes/parser/Parser.php

index 63a297b..b563613 100644 (file)
@@ -3151,7 +3151,8 @@ class Parser {
                                                $this->mOutput->addOutputPageMetadata( $context->getOutput() );
                                                $found = true;
                                                $isHTML = true;
-                                               $this->disableCache();
+                                               // Severely reduce cache time to keep content dynamic
+                                               $this->mOutput->updateCacheExpiry( 30 );
                                        }
                                } elseif ( MWNamespace::isNonincludable( $title->getNamespace() ) ) {
                                        $found = false; # access denied