Support plural for 'linkstoimage', 'redirectstofile' and 'duplicatesoffile'
[lhc/web/wiklou.git] / maintenance / clear_stats.php
1 <?php
2 /**
3 * @file
4 * @ingroup Maintenance
5 */
6
7 require_once('commandLine.inc');
8
9 foreach ( $wgLocalDatabases as $db ) {
10 noisyDelete("$db:stats:request_with_session");
11 noisyDelete("$db:stats:request_without_session");
12 noisyDelete("$db:stats:pcache_hit");
13 noisyDelete("$db:stats:pcache_miss_invalid");
14 noisyDelete("$db:stats:pcache_miss_expired");
15 noisyDelete("$db:stats:pcache_miss_absent");
16 noisyDelete("$db:stats:pcache_miss_stub");
17 noisyDelete("$db:stats:image_cache_hit");
18 noisyDelete("$db:stats:image_cache_miss");
19 noisyDelete("$db:stats:image_cache_update");
20 noisyDelete("$db:stats:diff_cache_hit");
21 noisyDelete("$db:stats:diff_cache_miss");
22 noisyDelete("$db:stats:diff_uncacheable");
23 }
24
25 function noisyDelete( $key ) {
26 global $wgMemc;
27 /*
28 print "$key ";
29 if ( $wgMemc->delete($key) ) {
30 print "deleted\n";
31 } else {
32 print "FAILED\n";
33 }*/
34 $wgMemc->delete($key);
35 }
36