Permalink
Browse files

a more clarification about what INCR can be used for

  • Loading branch information...
1 parent 53ba594 commit c282e6da48a7624f02d7812671bd47f38be25278 @tnm tnm committed May 2, 2010
Showing with 5 additions and 5 deletions.
  1. +5 −5 recipes/2_basic_commands/create_unique_ids/recipe.md
@@ -6,19 +6,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>
+ $redis-cli INCR <next_object_id>
(integer) 1
- $redis-cli INCR <an_object_name>
+ $redis-cli INCR <next_object_id>
(integer) 2
- $redis-cli INCR <another_object_name>
+ $redis-cli INCR <another_next_object_id>
(integer) 1
- $redis-cli GET <an_object_name>
+ $redis-cli GET <next_object_id>
2
- $redis-cli GET <another_object_name>
+ $redis-cli GET <another_next_object_Id>
1
### Discussion

0 comments on commit c282e6d

Please sign in to comment.