Method: Redis#rpushx

Defined in:
lib/redis.rb

#rpushx(key, value) ⇒ Fixnum

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

Parameters:

  • key (String)
  • value (String)

Returns:

  • (Fixnum)

    the length of the list after the push operation



1001
1002
1003
1004
1005
# File 'lib/redis.rb', line 1001

def rpushx(key, value)
  synchronize do |client|
    client.call([:rpushx, key, value])
  end
end