added function setSquidMaxage to adjust the Cache timeout for special pages
authorGabriel Wicke <gwicke@users.mediawiki.org>
Sun, 8 Feb 2004 21:12:07 +0000 (21:12 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Sun, 8 Feb 2004 21:12:07 +0000 (21:12 +0000)
includes/OutputPage.php

index ac82ad2..92b416e 100644 (file)
@@ -246,8 +246,14 @@ class OutputPage {
                wfProfileOut( $fname );
        }
 
+       # Set the maximum cache time on the Squid in seconds
+       function setSquidMaxage( $maxage ) {
+               global $wgSquidMaxage;
+               $wgSquidMaxage = $maxage;
+       }
+       
        function sendCacheControl() {
-               global $wgUseSquid, $wgUseESI, $wgSquidMaxage;
+               global $wgUseSquid, $wgUseESI, $wgSquidMaxage, $wgOut;
                # FIXME: This header may cause trouble with some versions of Internet Explorer
                header( "Vary: Accept-Encoding, Cookie" );
                if( $this->mLastModified != "" ) {