## KEY COMMANDS 1DEL key This command deletes the key, if it exists. 2DUMP key This command returns a serialized version of the value stored at the specified key. 3EXISTS key This command checks whether the key exists or not. 4EXPIRE key seconds Sets the expiry of the key after the specified time. 5EXPIREAT key timestamp Sets the expiry of the key after the specified time. Here time is in Unix timestamp format. 6PEXPIRE key milliseconds Set the expiry of key in milliseconds. 7PEXPIREAT key milliseconds-timestamp Sets the expiry of the key in Unix timestamp specified as milliseconds. 8KEYS pattern Finds all keys matching the specified pattern. 9MOVE key db Moves a key to another database. 10PERSIST key Removes the expiration from the key. 11PTTL key Gets the remaining time in keys expiry in milliseconds. 12TTL key Gets the remaining time in keys expiry. 13RANDOMKEY Returns a random key from Redis. 14RENAME key newkey Changes the key name. 15RENAMENX key newkey Renames the key, if a new key doesn't exist. 16TYPE key Returns the data type of the value stored in the key.