Method: Valkey::Commands::ListCommands#rpushx

Defined in:
lib/valkey/commands/list_commands.rb

#rpushx(key, value) ⇒ Integer

Append a value to a list, only if the list exists.

Parameters:

  • key (String)
  • value (String)

Returns:

  • (Integer)

    the length of the list after the push operation



102
103
104
# File 'lib/valkey/commands/list_commands.rb', line 102

def rpushx(key, value)
  send_command(RequestType::RPUSHX, [key, value])
end