Created
May 21, 2017 17:36
-
-
Save indyarocks/2ce1317f71221ac9dbb676e9fd799f62 to your computer and use it in GitHub Desktop.
Redis STRING data type
This file contains hidden or 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
127.0.0.1:6379> SET foo bar # Setting foo with value bar | |
OK | |
127.0.0.1:6379> GET foo # Getting value at key foo | |
"bar" | |
127.0.0.1:6379> GET chandan # Getting a non-set value. Returns nil | |
(nil) | |
127.0.0.1:6379> DEL chandan # Deleting a non-set key. Returns nil | |
(integer) 0 | |
127.0.0.1:6379> SET chandan faodail # Setting a new key-value (Note: All downcased letters in key) | |
OK | |
127.0.0.1:6379> DEL foo # Deleting an existing key. Returns 1 | |
(integer) 1 | |
127.0.0.1:6379> GET foo # Getting deleted key-value. Returns nil | |
(nil) | |
127.0.0.1:6379> GET chandan # Getting value at key chandan (Note: All downcased letters) | |
"faodail" | |
127.0.0.1:6379> GET Chandan # NOTE the CASE-SENSITIVE Key, fetching value for Chandan as nil | |
(nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment