From: Ori Livneh Date: Thu, 4 Dec 2014 01:27:01 +0000 (-0800) Subject: Make ApiStashEdit use the StashEdit log group, rather than PreparedEdit X-Git-Tag: 1.31.0-rc.0~13096 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=afd317ac50878f750fccecc3fb4064c350991e34;p=lhc%2Fweb%2Fwiklou.git Make ApiStashEdit use the StashEdit log group, rather than PreparedEdit An early version of what ultimately became commit 3a6c9d36c used 'ApiPreparedEdit' instead of 'ApiStashEdit'. The class / file were renamed but not the log group. Change-Id: Ib4de1f1f21f058d3be627048bc93e7730515d340 --- diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index d8c7077315..00f68147bf 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -131,14 +131,14 @@ class ApiStashEdit extends ApiBase { $ok = $wgMemc->set( $key, $stashInfo, $ttl ); if ( $ok ) { $status = 'stashed'; - wfDebugLog( 'PreparedEdit', "Cached parser output for key '$key'." ); + wfDebugLog( 'StashEdit', "Cached parser output for key '$key'." ); } else { $status = 'error'; - wfDebugLog( 'PreparedEdit', "Failed to cache parser output for key '$key'." ); + wfDebugLog( 'StashEdit', "Failed to cache parser output for key '$key'." ); } } else { $status = 'uncacheable'; - wfDebugLog( 'PreparedEdit', "Uncacheable parser output for key '$key'." ); + wfDebugLog( 'StashEdit', "Uncacheable parser output for key '$key'." ); } } @@ -196,7 +196,7 @@ class ApiStashEdit extends ApiBase { $editInfo = $wgMemc->get( $key ); $wgMemc->unlock( $key ); $sec = microtime( true ) - $start; - wfDebugLog( 'PreparedEdit', "Waited $sec seconds on '$key'." ); + wfDebugLog( 'StashEdit', "Waited $sec seconds on '$key'." ); } } @@ -206,7 +206,7 @@ class ApiStashEdit extends ApiBase { $time = wfTimestamp( TS_UNIX, $editInfo->output->getTimestamp() ); if ( ( time() - $time ) <= 3 ) { - wfDebugLog( 'PreparedEdit', "Timestamp-based cache hit for key '$key'." ); + wfDebugLog( 'StashEdit', "Timestamp-based cache hit for key '$key'." ); return $editInfo; // assume nothing changed } @@ -224,7 +224,7 @@ class ApiStashEdit extends ApiBase { $change = $dbr->selectField( 'page', '1', $dbr->makeList( $cWhr, LIST_OR ), __METHOD__ ); $n = $dbr->selectField( 'page', 'COUNT(*)', $dbr->makeList( $dWhr, LIST_OR ), __METHOD__ ); if ( $change || $n != count( $dWhr ) ) { - wfDebugLog( 'PreparedEdit', "Stale cache for key '$key'; template changed." ); + wfDebugLog( 'StashEdit', "Stale cache for key '$key'; template changed." ); return false; } @@ -239,11 +239,11 @@ class ApiStashEdit extends ApiBase { $change = $dbr->selectField( 'image', '1', $dbr->makeList( $cWhr, LIST_OR ), __METHOD__ ); $n = $dbr->selectField( 'image', 'COUNT(*)', $dbr->makeList( $dWhr, LIST_OR ), __METHOD__ ); if ( $change || $n != count( $dWhr ) ) { - wfDebugLog( 'PreparedEdit', "Stale cache for key '$key'; file changed." ); + wfDebugLog( 'StashEdit', "Stale cache for key '$key'; file changed." ); return false; } - wfDebugLog( 'PreparedEdit', "Cache hit for key '$key'." ); + wfDebugLog( 'StashEdit', "Cache hit for key '$key'." ); return $editInfo; }