Memcache View List all key methods

Source: Internet
Author: User


1. cmd on login memcache

Telnet 127.0.0.1 11211


2. List all keys

Stats items//This is a command that lists all keys

    1. Get key through the items ID in the return information of the stats items

    2. ///For example Itemid for 7 The second parameter is listed for length 0 for listing the current ID corresponding to the key name  

STAT Items:7:number 1

STAT Items:7:age 188

END


3. Get key via Itemid

Next, based on the items ID listed, this example is 7, the 2nd parameter is the length listed, and 0 is all listed

Stats cachedump 7 0//This is an order.

    1. By getting the value of key as above

    2. Get key//Key name from previous step

ITEM Sess_sidsvpc1473t1np08qnkvhf6j2 [183 b;1394527347 S]

END


4. Get the key value via get

The stats cachedump command above lists my session key, followed by a GET command to find the corresponding session value

Get SESS_SIDSVPC1473T1NP08QNKVHF6J2//This is an order.

VALUE

SESS_SIDSVPC1473T1NP08QNKVHF6J2 1440 1

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 ";}


5. Reference Address

Reference Address: http://www.darkcoding.net/software/memcached-list-all-keys/


Memcache View List all key methods

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.