Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
adding a few missing lines of redis-cli
  • Loading branch information
tnm committed May 2, 2010
1 parent 94f80c3 commit 53ba594
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions recipes/2_basic_commands/create_unique_ids/recipe.md
Expand Up @@ -7,16 +7,19 @@ You want to atomically provide a unique ID for an arbitrary object.
Utilize Redis' built-in atomic INCR function.

$redis-cli INCR <an_object_name>
(interger) 1
(integer) 1

$redis-cli INCR <an_object_name>
(integer) 2

$redis-cli INCR <another_object_name>
(interger) 2
(integer) 1

$redis-cli GET <an_object_name>
1
2
$redis-cli GET <another_object_name>
2
1

### Discussion

Expand Down

0 comments on commit 53ba594

Please sign in to comment.