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)

原文地址:https://www.cnblogs.com/wswang/p/5432307.html