Can memcache tell you how much memory it is using?
Can memcac开发者_Go百科he tell you how much memory it is using in total?
How about for a particular key?
And on the command line, you could do this:
echo "stats" | nc 127.0.0.1 11211 | grep bytes
In php, but I'm sure you are able to translate to RoR:-
echo "You are using " . $memcache->getstats()["bytes"] . " of storage ";
echo "out of " . $memcache->getstats()["limit_maxbytes"];
See http://php.net/manual/en/memcache.getstats.php
精彩评论