Search code examples
sortingredisphpredis

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 ?


Solution

  • Couldn't you simply use

    del setname
    

    To delete the set?