2013年5月21日

python pipeline 支持get和delete操作

摘要: 前言:pipeline缓存一堆的command,最后一次性执行。但是如果操作过程中需要先到redis中get一次,对数据进行相关处理,最后在进行set/delete等操作,怎么办?看官方文档:https://github.com/andymccurdy/redis-py找到pipeline,阅读下面代码with r.pipeline() as pipe: while 1: try: # put a WATCH on the key that holds our sequence value pipe.watch('OUR-SE... 阅读全文

posted @ 2013-05-21 17:20 xiaorao 阅读(2580) 评论(0) 推荐(0) 编辑

导航