Skip to content

Instantly share code, notes, and snippets.

@radamant
Created November 17, 2010 02:58
Show Gist options
  • Select an option

  • Save radamant/702914 to your computer and use it in GitHub Desktop.

Select an option

Save radamant/702914 to your computer and use it in GitHub Desktop.
a-ha!
redis> lrange test-index-list 0 -1
1. "4"
2. "3"
3. "2"
4. "1"
redis> set test-index-index:4 100
OK
redis> set test-index-index:4 100
OK
redis> set test-index-index:3 500
OK
redis> set test-index-index:2 200
OK
redis> set test-index-index:1 2000
OK
redis> sort test-index-list by test-index-index:*
1. "4"
2. "2"
3. "3"
4. "1"
redis> sort test-index-list by test-index-index:* get test-index-data:*->name
1. "hal"
2. "fanny"
3. "zelda"
4. "bob"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment