Created
September 7, 2015 14:43
-
-
Save rofr/215468efb32d4f22dea2 to your computer and use it in GitHub Desktop.
redis - the machine language of databases
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
INCR next_user_id //returns 1000 | |
HMSET user:1000 name bart password ¤¤¤hash¤¤¤ | |
HSET users bart 1000 | |
ZADD followers:1000 1401267618 1234 | |
ZADD following:1234 1401267618 1000 | |
INCR next_post_id => 10343 | |
HMSET post:10343 user 1000 time $time body ’Ay Caramba’ | |
RPUSH posts:1000 10343 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment