Home > Article > Backend Development > Detailed explanation of python linking and operating memcache methods
1, open the memcached service
memcached -m 10 -p 12000
2, use the python-memcached module, Perform simple links and access data
##
import memcache mc = memcache.Client(['127.0.0.1:12000'], debug=0) mc.set("foo", "bar") mc.get("foo") mc.disconnect_all()
##3. For other methods, please refer to:
help(mc)
The above python link and memcache operation method are all the content shared by the editor. I hope it can give you a reference, and I hope Please support PHP Chinese website.
For more python links and detailed explanations of how to operate memcache, please pay attention to the PHP Chinese website!