<?php /** * memcached diagnostic tool * * @todo document * @package MediaWiki * @subpackage Maintenance */ /** */ require_once "commandLine.inc"; require_once "memcached-client.php"; $mcc = new memcached(array('persistant' => true, 'debug' => true)); $mcc->set_servers($wgMemCachedServers); $mcc->set_debug(true); do { $bad = false; $quit = false; $line = readconsole("> "); if ($line === false) { exit; } $args = explode(" ", $line); $command = array_shift($args); switch ($command) { case "get": print "Getting {$args[0]}[{$args[1]}]\n"; $res = $mcc->get($args[0]); if (array_key_exists(1, $args)) { $res = $res[$args[1]]; }