Merge "Added autopatrol parameter to MarkPatrolled and MarkPatrolledComplete hooks"
[lhc/web/wiklou.git] / includes / interwiki / Interwiki.php
index 2bfe756..bd8291f 100644 (file)
@@ -218,9 +218,12 @@ class Interwiki {
 
                $iwData = ObjectCache::getMainWANInstance()->getWithSetCallback(
                        wfMemcKey( 'interwiki', $prefix ),
+                       $wgInterwikiExpiry,
                        function ( $oldValue, &$ttl, array &$setOpts ) use ( $prefix ) {
                                $dbr = wfGetDB( DB_SLAVE );
 
+                               $setOpts += Database::getCacheSetOptions( $dbr );
+
                                $row = $dbr->selectRow(
                                        'interwiki',
                                        Interwiki::selectFields(),
@@ -228,11 +231,8 @@ class Interwiki {
                                        __METHOD__
                                );
 
-                               $setOpts = array( 'since' => $dbr->trxTimestamp() );
-
                                return $row ? (array)$row : '!NONEXISTENT';
-                       },
-                       $wgInterwikiExpiry
+                       }
                );
 
                if ( is_array( $iwData ) ) {