Redis – String Getset Command
Redis GETSET command sets the specified string value in Redis key and returns its old value. Return Value Simple string reply, old value of the key. If the key does not exist,…
Redis GETSET command sets the specified string value in Redis key and returns its old value. Return Value Simple string reply, old value of the key. If the key does not exist,…
Redis GETRANGE command is used to get the substring of the string value stored at the key, determined by the offsets start and end (both are inclusive). Negative offsets can be used…
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,…
Redis SET command is used to set some string value in Redis key. Return Value Simple string reply. OK, if the value is set in the key. Null, if the value does…
Redis strings commands are used for managing string values in Redis. Following is the syntax for using Redis string commands. Syntax redis 127.0.0.1:6379> COMMAND KEY_NAME Example redis 127.0.0.1:6379> SET Adglob…
Redis TYPE command is used to get the data type of the value stored in the key. Return Value String reply, data type of the value stored in the key or none.…
Redis RENAMENX command is used to change the name of a key, if the new key does not exist. Return Value Integer reply 1 or 0. 1, if key is renamed to…
Redis RENAME command is used to change the name of a key. Return Value String reply OK or error. It returns an error if the old key and the new key names…
Redis RANDOMKEY command is used to get a random key from Redis database. Return Value String, a random key or nil, if the database is empty. Syntax Following is the basic syntax…
Redis TTL command is used to get the remaining time of the key expiry in seconds. Return Value Integer value TTL in milliseconds, or a negative value. TTL in milliseconds.-1, if key…