当前位置: 动力学知识库 > 问答 > 编程问答 >

sorting - Resetting Redis sorted set

问题描述:

I m using redis server to sort scores in an online game.

The gameplay is divided into play sequence of 2-3 minutes and after each sequences scores are displayed and user get his rank (zadd, zrevrank)

All is ok with this, but how do I can reset my sorted set after my play sequence ? I found ZREM but looks like I have to specify keys. is there a quick way to remove all values from the sorted set ?

网友答案:

Couldn't you simply use

del setname

To delete the set?

分享给朋友:
您可能感兴趣的文章:
随机阅读: