* @return DatabaseBase
*/
function getSlaveDB() {
- return wfGetDB( DB_SLAVE );
+ return wfGetDB( DB_REPLICA );
}
/**
}
/**
- * Get a callback to get a DB handle given an index (DB_SLAVE/DB_MASTER)
+ * Get a callback to get a DB handle given an index (DB_REPLICA/DB_MASTER)
* @return Closure
*/
protected function getDBFactory() {
function invalidateImageRedirect( Title $title ) {
$key = $this->getSharedCacheKey( 'image_redirect', md5( $title->getDBkey() ) );
if ( $key ) {
- $this->getMasterDB()->onTransactionPreCommitOrIdle( function() use ( $key ) {
- ObjectCache::getMainWANInstance()->delete( $key );
- } );
+ $this->getMasterDB()->onTransactionPreCommitOrIdle(
+ function () use ( $key ) {
+ ObjectCache::getMainWANInstance()->delete( $key );
+ },
+ __METHOD__
+ );
}
}