Index: trunk/phase3/includes/RawPage.php |
— | — | @@ -153,10 +153,8 @@ |
154 | 154 | if( HTMLFileCache::useFileCache() ) { |
155 | 155 | $cache = new HTMLFileCache( $this->mTitle, 'raw' ); |
156 | 156 | if( $cache->isFileCacheGood( /* Assume up to date */ ) ) { |
157 | | - /* Check incoming headers to see if client has this cached */ |
158 | | - if( !$wgOut->checkLastModified( $cache->fileCacheTime() ) ) { |
159 | | - $cache->loadFromFileCache(); |
160 | | - } |
| 157 | + $cache->loadFromFileCache(); |
| 158 | + $wgOut->disable(); |
161 | 159 | return; |
162 | 160 | } else { |
163 | 161 | ob_start( array(&$cache, 'saveToFileCache' ) ); |
Index: trunk/phase3/includes/HTMLFileCache.php |
— | — | @@ -24,6 +24,7 @@ |
25 | 25 | |
26 | 26 | public function __construct( &$title, $type = 'view' ) { |
27 | 27 | $this->mTitle = $title; |
| 28 | + $type = $type ? $type : 'view'; |
28 | 29 | $this->mType = ($type == 'raw' || $type == 'view' ) ? $type : false; |
29 | 30 | $this->fileCacheName(); // init name |
30 | 31 | } |
Index: trunk/phase3/index.php |
— | — | @@ -82,12 +82,11 @@ |
83 | 83 | /* Check incoming headers to see if client has this cached */ |
84 | 84 | if( !$wgOut->checkLastModified( $cache->fileCacheTime() ) ) { |
85 | 85 | $cache->loadFromFileCache(); |
86 | | - # Do any stats increment/watchlist stuff |
87 | | - $wgArticle = self::articleFromTitle( $wgTitle ); |
88 | | - $wgArticle->viewUpdates(); |
89 | 86 | } |
| 87 | + # Do any stats increment/watchlist stuff |
| 88 | + $wgArticle = MediaWiki::articleFromTitle( $wgTitle ); |
| 89 | + $wgArticle->viewUpdates(); |
90 | 90 | # Tell $wgOut that output is taken care of |
91 | | - $wgOut->disable(); |
92 | 91 | wfProfileOut( 'main-try-filecache' ); |
93 | 92 | $mediaWiki->restInPeace(); |
94 | 93 | exit; |