redis 去除list的所有数据

2021-04-07  本文已影响0人  不能没有音乐

ltrim(name, start, end)
在name对应的列表中移除没有在start-end索引之间的值
参数:
name,redis的name
start,索引的起始位置
end,索引结束位置

conn.ltrim(self.key_name, 0, -len(data)-1)

上一篇下一篇

猜你喜欢

热点阅读