array( 'activeusers-intro', $this->getLanguage()->formatNum( $wgActiveUserDays ) ) );
// Occasionally merge in new updates
- $seconds = self::mergeActiveUsers( 600 );
+ $seconds = min( self::mergeActiveUsers( 600 ), $wgActiveUserDays * 86400 );
// Mention the level of staleness
$out->addWikiMsg( 'cachedspecial-viewing-cached-ttl',
$this->getLanguage()->formatDuration( $seconds ) );
if ( !wfReadOnly() ) {
if ( !$cTime || ( time() - wfTimestamp( TS_UNIX, $cTime ) ) > $period ) {
$dbw = wfGetDB( DB_MASTER );
- self::doQueryCacheUpdate( $dbw, 2 * $period );
+ if ( $dbw->estimateRowCount( 'recentchanges' ) <= 10000 ) {
+ $window = $wgActiveUserDays * 86400; // small wiki
+ } else {
+ $window = $period * 2;
+ }
+ self::doQueryCacheUpdate( $dbw, $window );
}
}
return ( time() -