python 链接和操作 memcache
1,打开memcached服务memcached -m 10 -p 12000
2,使用python-memcached模块,进行简单的链接和存取数据
import memcache
mc = memcache.Client(['127.0.0.1:12000'], debug=0)
mc.set("foo", "bar")
mc.get("foo")
mc.disconnect_all()
3,其它方法请参考:
help(mc)
页:
[1]