From 7dd06318fc750fb103db55d23a27fca882827b1f Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 20 Dec 2008 20:59:06 +0000 Subject: [PATCH] Use $wgInterwikiExpiry to set the expiry time of interwiki cache --- includes/Interwiki.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.20.1