django redis操作

from utils.redis.connect import redis_cache as r
r.flushdb()

列表操作

r.lpush("name", xxxx) or r.lpush("name", *xxxx)
r.lpop("name")
r.llen("name")

集合操作

r.sset(key, value)

posted @ 2016-04-25 18:56  wswang  阅读(673)  评论(0)    收藏  举报