Redis – String Get Command

  • Post author:
  • Post category:Redis
  • Post comments:1 Comment

Redis GET command is used to get the value stored in the specified key. If the key does not exist, then nil is returned. If the returned value is not a string, then error is returned.

Return Value

Simple string reply. Value or key or nil.

Syntax

Following is the basic syntax of Redis GET command.

redis 127.0.0.1:6379> GET KEY_NAME

Example

First, set a key in Redis and then get it.

redis 127.0.0.1:6379> SET Adglob redis 
OK 
redis 127.0.0.1:6379> GET Adglob 
"redis" 

This Post Has One Comment

  1. superslot

    Im grateful for the blog post. Great.

Leave a Reply