Nov 7, 2022

Command to read Azure Redis Cache key value.

Here are the commands to retrieve key value:

  • 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>
  • If value is of type stream - xread count <count> streams <key> <ID>

Use the TYPE command to check the type of value a key is mapping to:
  • type <key>

No comments: