redis-cli Commands cheetsheet

Flush all keys

FLUSHALL

List all the keys

KEYS *

Check type of key

type <key>

Get value of key

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>

Leave a Comment

Your email address will not be published. Required fields are marked *