Index: trunk/phase3/includes/Interwiki.php |
— | — | @@ -139,7 +139,7 @@ |
140 | 140 | * |
141 | 141 | */ |
142 | 142 | protected static function load( $prefix ) { |
143 | | - global $wgMemc; |
| 143 | + global $wgMemc, $wgInterwikiExpiry; |
144 | 144 | $key = wfMemcKey( 'interwiki', $prefix ); |
145 | 145 | $mc = $wgMemc->get( $key ); |
146 | 146 | $iw = false; |
— | — | @@ -157,12 +157,12 @@ |
158 | 158 | $iw = Interwiki::loadFromArray( $row ); |
159 | 159 | if( $iw ) { |
160 | 160 | $mc = array( 'iw_url' => $iw->mURL, 'iw_local' => $iw->mLocal, 'iw_trans' => $iw->mTrans ); |
161 | | - $wgMemc->add( $key, $mc ); |
| 161 | + $wgMemc->add( $key, $mc, $wgInterwikiExpiry ); |
162 | 162 | return $iw; |
163 | 163 | } else { |
164 | 164 | # Pages like "Command & Conquer 3: Kane's Wrath" may keep checking |
165 | 165 | # the prefix. Cache the negative result to avoid extra db hits. |
166 | | - $wgMemc->add( $key, 0 ); |
| 166 | + $wgMemc->add( $key, 0, $wgInterwikiExpiry ); |
167 | 167 | } |
168 | 168 | return false; |
169 | 169 | } |