require_once( 'commandLine.inc' );
require_once( 'memcached-client.php' );
-$mcc = new memcached( array('persistant' => true, 'debug' => true) );
+$mcc = new memcached( array('persistant' => true/*, 'debug' => true*/) );
$mcc->set_servers( $wgMemCachedServers );
-$mcc->set_debug( true );
+#$mcc->set_debug( true );
function mccShowHelp($command) {
print "history: show command line history\n";
if($onlyone) { break; }
+ case 'server':
+ print "server: show current memcached server\n";
+ if($onlyone) { break; }
+
case 'dumpmcc':
print "dumpmcc: shows the whole thing\n";
if($onlyone) { break; }
$line = readconsole( '> ' );
if ($line === false) exit;
-
+
$args = explode( ' ', $line );
$command = array_shift( $args );
var_dump( $sock );
break;
+ case 'server':
+ $res = $mcc->get( $args[0] );
+ print $mcc->_buckets[$mcc->_hashfunc( $args[0] ) % $mcc->_bucketcount] . "\n";
+ break;
+
case 'set':
$key = array_shift( $args );
if ( $args[0] == "#" && is_numeric( $args[1] ) ) {