Method: Redis#lpushx

Defined in:
lib/redis.rb

#lpushx(key, value) ⇒ Fixnum

Prepend 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



979
980
981
982
983
# File 'lib/redis.rb', line 979

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