Exclude bots from edit stash stats
Change-Id: Id309879eaaf039de7ac5f531930fa8e758a959c7
This commit is contained in:
parent
70739c2a97
commit
cddfe0d98f
1 changed files with 4 additions and 0 deletions
|
|
@ -259,6 +259,10 @@ class ApiStashEdit extends ApiBase {
|
|||
* @return stdClass|bool Returns false on cache miss
|
||||
*/
|
||||
public static function checkCache( Title $title, Content $content, User $user ) {
|
||||
if ( $user->isBot() ) {
|
||||
return false; // bots never stash - don't pollute stats
|
||||
}
|
||||
|
||||
$cache = ObjectCache::getLocalClusterInstance();
|
||||
$logger = LoggerFactory::getInstance( 'StashEdit' );
|
||||
$stats = RequestContext::getMain()->getStats();
|
||||
|
|
|
|||
Loading…
Reference in a new issue