Make transcluded special pages not disable cache in miser mode.
[lhc/web/wiklou.git] / includes / specials / SpecialNewpages.php
index c24b054..ff9a899 100644 (file)
@@ -478,4 +478,18 @@ class SpecialNewpages extends IncludableSpecialPage {
        protected function getGroupName() {
                return 'changes';
        }
+
+       /**
+        * How long to cache page when it is being included.
+        *
+        * @return int Time in seconds, 0 to disable caching altogether
+        */
+       public function maxIncludeCacheTime() {
+               global $wgMiserMode;
+               if ( !$wgMiserMode ) {
+                       return 0;
+               } else {
+                       return 60*5;
+               }
+       }
 }