Skip to content

Commit

Permalink
rename keys to ids to properly represent the fact that llrange return…
Browse files Browse the repository at this point in the history
…s values, not keys
  • Loading branch information
Karl Seguin committed Aug 6, 2013
1 parent 5a79ae4 commit 469405d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions en/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ First we push a new user at the front of the list, then we trim it so that it on

This is also the first time that we are seeing a value in one key referencing a value in another. If we wanted to get the details of the last 10 users, we'd do the following combination:

keys = redis.lrange('newusers', 0, 10)
redis.mget(*keys.map {|u| "users:#{u}"})
ids = redis.lrange('newusers', 0, 10)
redis.mget(*ids.map {|u| "users:#{u}"})

The above is a bit of Ruby which shows the type of multiple roundtrips we talked about before.

Expand Down

0 comments on commit 469405d

Please sign in to comment.