Index: trunk/phase3/includes/QueryPage.php |
— | — | @@ -85,6 +85,8 @@ |
86 | 86 | */ |
87 | 87 | protected $numRows; |
88 | 88 | |
| 89 | + protected $cachedTimestamp = null; |
| 90 | + |
89 | 91 | /** |
90 | 92 | * Wheter to show prev/next links |
91 | 93 | */ |
— | — | @@ -416,9 +418,13 @@ |
417 | 419 | } |
418 | 420 | |
419 | 421 | public function getCachedTimestamp() { |
420 | | - $dbr = wfGetDB( DB_SLAVE ); |
421 | | - $fname = get_class( $this ) . '::getCachedTimestamp'; |
422 | | - return $dbr->selectField( 'querycache_info', 'qci_timestamp', array( 'qci_type' => $this->getName() ), $fname ); |
| 422 | + if ( !is_null( $this->cachedTimestamp ) ) { |
| 423 | + $dbr = wfGetDB( DB_SLAVE ); |
| 424 | + $fname = get_class( $this ) . '::getCachedTimestamp'; |
| 425 | + $this->cachedTimestamp = $dbr->selectField( 'querycache_info', 'qci_timestamp', |
| 426 | + array( 'qci_type' => $this->getName() ), $fname ); |
| 427 | + } |
| 428 | + return $this->cachedTimestamp; |
423 | 429 | } |
424 | 430 | |
425 | 431 | /** |