Skip to content

Instantly share code, notes, and snippets.

@rhiroyuki
Created April 4, 2019 16:41
Show Gist options
  • Save rhiroyuki/b3c1dfe838794889ebf4fda6999f82a7 to your computer and use it in GitHub Desktop.
Save rhiroyuki/b3c1dfe838794889ebf4fda6999f82a7 to your computer and use it in GitHub Desktop.
About Redis

REDIS

if value is of type string -> GET <key>
if value is of type hash -> HGETALL <key>
if value is of type lists -> lrange <key> <start> <end>
if value is of type sets -> smembers <key>
if value is of type sorted sets -> ZRANGEBYSCORE <key> <min> <max>

command to check the type of value a key mapping to:

type <key>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment