From: Alexandre Emsenhuber Date: Sat, 20 Dec 2008 20:59:06 +0000 (+0000) Subject: Use $wgInterwikiExpiry to set the expiry time of interwiki cache X-Git-Tag: 1.31.0-rc.0~43857 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=7dd06318fc750fb103db55d23a27fca882827b1f;p=lhc%2Fweb%2Fwiklou.git Use $wgInterwikiExpiry to set the expiry time of interwiki cache --- diff --git a/includes/Interwiki.php b/includes/Interwiki.php index abcef1f950..1cd96b52b5 100644 --- a/includes/Interwiki.php +++ b/includes/Interwiki.php @@ -139,7 +139,7 @@ class Interwiki { * */ protected static function load( $prefix ) { - global $wgMemc; + global $wgMemc, $wgInterwikiExpiry; $key = wfMemcKey( 'interwiki', $prefix ); $mc = $wgMemc->get( $key ); $iw = false; @@ -157,12 +157,12 @@ class Interwiki { $iw = Interwiki::loadFromArray( $row ); if( $iw ) { $mc = array( 'iw_url' => $iw->mURL, 'iw_local' => $iw->mLocal, 'iw_trans' => $iw->mTrans ); - $wgMemc->add( $key, $mc ); + $wgMemc->add( $key, $mc, $wgInterwikiExpiry ); return $iw; } else { # Pages like "Command & Conquer 3: Kane's Wrath" may keep checking # the prefix. Cache the negative result to avoid extra db hits. - $wgMemc->add( $key, 0 ); + $wgMemc->add( $key, 0, $wgInterwikiExpiry ); } return false; }