直接举个Telnet命令行下遍历memcached所有key的方法:
stats items
STAT items:7:number1
STATitems:7:age188
END
stats cachedump 7 0
ITEM Sess_sidsvpc1473t1np08qnkvhf6j2[183b;1394527347s]
END
注:第二个参数0表示查询第7块区的所有键,如果该为100就是查询前100个键。
get Sess_sidsvpc1473t1np08qnkvhf6j2
VALUE
Sess_sidsvpc1473t1np08qnkvhf6j214401
83
Sess_|a:5:{ s:6:"verify";s:32:"e70981fd305170c41a5632b2a24bbcaa";s:3:"uid";s:1:"1
";s:8:"username";s:5:"admin";s:9:"logintime";s:19:"2014-03-11 16:24:25";s:7:"log
inip";s:9:"127.0.0.1";}