Job::pop() may occasionally return false when there are actually more jobs remaining...
[lhc/web/wiklou.git] / maintenance / clear_stats.php
1 <?php
2 require_once('commandLine.inc');
3
4 foreach ( $wgLocalDatabases as $db ) {
5 noisyDelete("$db:stats:request_with_session");
6 noisyDelete("$db:stats:request_without_session");
7 noisyDelete("$db:stats:pcache_hit");
8 noisyDelete("$db:stats:pcache_miss_invalid");
9 noisyDelete("$db:stats:pcache_miss_expired");
10 noisyDelete("$db:stats:pcache_miss_absent");
11 noisyDelete("$db:stats:pcache_miss_stub");
12 noisyDelete("$db:stats:image_cache_hit");
13 noisyDelete("$db:stats:image_cache_miss");
14 noisyDelete("$db:stats:image_cache_update");
15 noisyDelete("$db:stats:diff_cache_hit");
16 noisyDelete("$db:stats:diff_cache_miss");
17 noisyDelete("$db:stats:diff_uncacheable");
18 }
19
20 function noisyDelete( $key ) {
21 global $wgMemc;
22 /*
23 print "$key ";
24 if ( $wgMemc->delete($key) ) {
25 print "deleted\n";
26 } else {
27 print "FAILED\n";
28 }*/
29 $wgMemc->delete($key);
30 }
31 ?>