简体   繁体   中英

How to get all the keys from memcache using python

I'm trying to find how to get all the keys from memcache but I can not find the answer. I saw some answer codes that using telnet but finally it didn't work. I want to know exactly how to get keys at once, using telnet or other things. It should be done in python.

Having in mind that Memcache acts as dict there is:

cache.get_multi(keys)

As seen on:

https://pymemcache.readthedocs.io/en/latest/apidoc/pymemcache.client.base.html#pymemcache.client.base.Client.get_multi

There is answer how to do this using telnet protocol. As far as I know there are no commands in Python Library for doing the same:

How to export all keys and values from memcached with python-memcache?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM