Fix typo in r97044 reported in twn
[lhc/web/wiklou.git] / maintenance / purgeStaleMemcachedText.php
index 200cc8b..c4f5006 100644 (file)
@@ -15,7 +15,18 @@ function purgeStaleMemcachedText() {
 
        for ( $i = $latestReplicatedTextId; $i < $maxTextId; $i++ ) {
                $key = wfMemcKey( 'revisiontext', 'textid', $i );
-               $wgMemc->delete( $key );
+               
+               while (1) {
+                       if (! $wgMemc->delete( $key ) ) {
+                               echo "Memcache delete for $key returned false\n";
+                       }
+                       if ( $wgMemc->get( $key ) ) {
+                               echo "There's still content in $key!\n";
+                       } else {
+                               break;
+                       }
+               }
+               
        }
 }