From 35a86615bf2336e31a49e4f1b6efcc9b9db96b92 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Sat, 13 Mar 2004 13:43:22 +0000 Subject: [PATCH] calls to setSquidMaxage for cacheable pages --- index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.php b/index.php index 4496160198..584e555bdc 100644 --- a/index.php +++ b/index.php @@ -93,6 +93,9 @@ if ( $search = $wgRequest->getText( 'search' ) ) { wfQuery("BEGIN", DB_WRITE); switch( $action ) { case "view": + $wgOut->setSquidMaxage( $wgSquidMaxage ); + $wgArticle->$action(); + break; case "watch": case "unwatch": case "delete": @@ -115,6 +118,9 @@ if ( $search = $wgRequest->getText( 'search' ) ) { $editor->$action(); break; case "history": + if ($_SERVER["REQUEST_URI"] == $wgTitle->getInternalURL('action=history')) { + $wgOut->setSquidMaxage( $wgSquidMaxage ); + } include_once( "PageHistory.php" ); $history = new PageHistory( $wgArticle ); $history->history(); @@ -126,6 +132,7 @@ if ( $search = $wgRequest->getText( 'search' ) ) { } $wgOut->output(); + foreach ( $wgDeferredUpdateList as $up ) { $up->doUpdate(); } logProfilingData(); wfDebug( "Request ended normally\n" ); -- 2.20.1