2005-01-04 12:30:49 +00:00
|
|
|
<?php
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
/**
|
2012-06-25 19:54:41 +00:00
|
|
|
* Removes all statistics tracking from the cache.
|
2010-12-04 03:20:14 +00:00
|
|
|
*
|
2009-08-02 19:35:17 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
|
*
|
2010-10-03 09:25:28 +00:00
|
|
|
* @file
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
* @ingroup Maintenance
|
|
|
|
|
*/
|
|
|
|
|
|
2013-05-17 00:16:59 +00:00
|
|
|
require_once __DIR__ . '/Maintenance.php';
|
2005-01-04 12:30:49 +00:00
|
|
|
|
2012-06-25 19:54:41 +00:00
|
|
|
/**
|
|
|
|
|
* Maintenance script to remove all statistics tracking from the cache.
|
|
|
|
|
*
|
|
|
|
|
* @ingroup Maintenance
|
|
|
|
|
*/
|
2013-02-11 09:58:42 +00:00
|
|
|
class ClearCacheStats extends Maintenance {
|
2009-08-02 19:35:17 +00:00
|
|
|
|
|
|
|
|
public function __construct() {
|
|
|
|
|
parent::__construct();
|
|
|
|
|
$this->mDescription = "Remove all statistics tracking from the cache";
|
|
|
|
|
}
|
2005-01-04 12:30:49 +00:00
|
|
|
|
2009-08-02 19:35:17 +00:00
|
|
|
public function execute() {
|
|
|
|
|
global $wgLocalDatabases, $wgMemc;
|
|
|
|
|
foreach ( $wgLocalDatabases as $db ) {
|
2010-05-22 16:50:39 +00:00
|
|
|
$wgMemc->delete( "$db:stats:request_with_session" );
|
|
|
|
|
$wgMemc->delete( "$db:stats:request_without_session" );
|
|
|
|
|
$wgMemc->delete( "$db:stats:pcache_hit" );
|
|
|
|
|
$wgMemc->delete( "$db:stats:pcache_miss_expired" );
|
|
|
|
|
$wgMemc->delete( "$db:stats:pcache_miss_absent" );
|
|
|
|
|
$wgMemc->delete( "$db:stats:pcache_miss_stub" );
|
|
|
|
|
$wgMemc->delete( "$db:stats:image_cache_hit" );
|
|
|
|
|
$wgMemc->delete( "$db:stats:image_cache_miss" );
|
|
|
|
|
$wgMemc->delete( "$db:stats:image_cache_update" );
|
|
|
|
|
$wgMemc->delete( "$db:stats:diff_cache_hit" );
|
|
|
|
|
$wgMemc->delete( "$db:stats:diff_cache_miss" );
|
|
|
|
|
$wgMemc->delete( "$db:stats:diff_uncacheable" );
|
2012-01-23 16:27:13 +00:00
|
|
|
$wgMemc->delete( "$db:stats:job-insert" );
|
|
|
|
|
$wgMemc->delete( "$db:stats:job-pop" );
|
2009-08-02 19:35:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
2005-01-04 12:30:49 +00:00
|
|
|
}
|
2007-06-29 01:19:14 +00:00
|
|
|
|
2013-02-11 09:58:42 +00:00
|
|
|
$maintClass = "ClearCacheStats";
|
2013-05-07 23:00:15 +00:00
|
|
|
require_once RUN_MAINTENANCE_IF_MAIN;
|