Created
March 15, 2013 06:44
-
-
Save kineticac/5167924 to your computer and use it in GitHub Desktop.
If you have a leaderboard or just want to save a specific number of the highest scored sets in a sorted set, use ZREMRANGEBYRANK. The example below will only keep the top 100 highest scored items:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZREMRANGEBYRANK key 0 -100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment