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  阅读(667)  评论(0编辑  收藏  举报