Index: trunk/phase3/maintenance/rebuildFileCache.php |
— | — | @@ -34,10 +34,14 @@ |
35 | 35 | |
36 | 36 | public function execute() { |
37 | 37 | global $wgUseFileCache, $wgReadOnly, $wgContentNamespaces, $wgRequestTime; |
| 38 | + global $wgDebugToolbar; |
38 | 39 | global $wgTitle, $wgOut; |
39 | 40 | if ( !$wgUseFileCache ) { |
40 | 41 | $this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true ); |
41 | 42 | } |
| 43 | + // Debug toolbar makes content uncacheable |
| 44 | + $wgDebugToolbar = false; |
| 45 | + |
42 | 46 | $wgReadOnly = 'Building cache'; // avoid DB writes (like enotif/counters) |
43 | 47 | |
44 | 48 | $start = $this->getOption( 'start', "0" ); |
Index: trunk/phase3/includes/cache/HTMLFileCache.php |
— | — | @@ -61,10 +61,15 @@ |
62 | 62 | * @return bool |
63 | 63 | */ |
64 | 64 | public static function useFileCache( IContextSource $context ) { |
65 | | - global $wgUseFileCache, $wgShowIPinHeader, $wgContLang; |
| 65 | + global $wgUseFileCache, $wgShowIPinHeader, $wgDebugToolbar, $wgContLang; |
66 | 66 | if ( !$wgUseFileCache ) { |
67 | 67 | return false; |
68 | 68 | } |
| 69 | + if( $wgShowIPinHeader || $wgDebugToolbar ) { |
| 70 | + wfDebug("HTML file cache skipped. Either \$wgShowIPinHeader and/or \$wgDebugToolbar on\n" ); |
| 71 | + return false; |
| 72 | + } |
| 73 | + |
69 | 74 | // Get all query values |
70 | 75 | $queryVals = $context->getRequest()->getValues(); |
71 | 76 | foreach ( $queryVals as $query => $val ) { |