This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15307|Reply: 0

[Memcached] Memcache looks at all key methods listed

[Copy link]
Posted on 1/6/2016 5:24:26 PM | | | |

Today I am doing a session test of Memcache, but in the process of testing, I found that Memcache does not have a relatively simple way to directly list all session keys like redis *, and according to the session content corresponding to key get, I started to look up the information, and most of the things that came out were some common memcache commands, etc., but there was not much explanation of the method of listing keys. So I came to Google and found a foreign information

I applied the specific content to my test environment, and the operation is as follows
1. cmd log in to Memcache



2. Make a list of all keys



3. Get the key through itemid
Next, based on the listed items ID, in this case it is 7, the second parameter is the length listed, and 0 is all listed




4. Get the key value by get
The above stats cachedump command lists my session key, and then use the get command to find the corresponding session value











Previous:mvc custom filter ActionFilterAttribute class
Next:asp.net Determining whether a user is logged in (SetAuthCookie related issues)
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com