您的位置:首页 > 编程语言 > Python开发

欢迎使用CSDN-markdown编辑器

2016-07-07 15:42 363 查看

Python Memcache Tips

组件包:python-memcached-1.43

使用例子

import memcache

mc = memcache.Client([‘127.0.0.1:11211’], debug=0)

mc.set(“some_key”, “Some value”)

value = mc.get(“some_key”)

mc.set(“another_key”, 3)

mc.delete(“another_key”)

mc.set(“key”, “1”) # note that the key used for incr/decr must be a string.

mc.incr(“key”)

mc.decr(“key”)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python