LocalRepo::checkRedirect() cache image redirect checks in memory to avoid
unnecessary trips to memcached. Same idea as Idbd11637.
Change-Id: Idaa12376382aaa0bd8cb988240ec1da0b688359d
return ( $row && $row->rd_namespace == NS_FILE )
? Title::makeTitle( $row->rd_namespace, $row->rd_title )->getDBkey()
: ''; // negative cache
- }
+ },
+ [ 'pcTTL' => $expiry ]
);
// @note: also checks " " for b/c
$this->lastRelayError = self::ERR_NONE;
}
+ /**
+ * Clear the in-process caches; useful for testing
+ *
+ * @since 1.27
+ */
+ public function clearProcessCache() {
+ $this->procCache->clear();
+ }
+
/**
* Do the actual async bus purge of a key
*
}
DeferredUpdates::clearPendingUpdates();
+ ObjectCache::getMainWANInstance()->clearProcessCache();
ob_start( 'MediaWikiTestCase::wfResetOutputBuffersBarrier' );
}