Method: Redis#hset

Defined in:
lib/redis.rb

#hset(key, field, value) ⇒ Boolean

Set the string value of a hash field.

Parameters:

  • key (String)
  • field (String)
  • value (String)

Returns:

  • (Boolean)

    whether or not the field was added to the hash


2109
2110
2111
2112
2113
# File 'lib/redis.rb', line 2109

def hset(key, field, value)
  synchronize do |client|
    client.call([:hset, key, field, value], &Boolify)
  end
end