From d7a93a085ac0c74da4a87b26b62fd0ed6bc2cd3a Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Sun, 8 Feb 2004 21:12:07 +0000 Subject: [PATCH] added function setSquidMaxage to adjust the Cache timeout for special pages --- includes/OutputPage.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index ac82ad2788..92b416e3fe 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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 != "" ) { -- 2.20.1