lib/memcached/memcached.rb
def add(key, value, ttl=@default_ttl, marshal=true, flags=FLAGS)
    value = marshal ? Marshal.dump(value) : value.to_s
    check_return_code(
      Lib.memcached_add(@struct, key, value, ttl, flags),
      key
    )
  end
# Add a key/value pair. Raises <b>Memcached::NotStored</b> if the key already exists on the server. The parameters are the same as <tt>set</tt>.
Add a key/value pair. Raises Memcached::NotStored if the key already exists on the server. The parameters are the same as set.
Add a key / value pair . Raises Memcached :: NotStored if the key already exists on the server . The parameters are the same as set .
def add(key, value, ttl=@default_ttl, marshal=true, flags=FLAGS)
    value = marshal ? Marshal.dump(value) : value.to_s
    check_return_code(
      Lib.memcached_add(@struct, key, value, ttl, flags),
      key
    )
  end
def add ( key , value , ttl = @default_ttl , marshal = true , flags = FLAGS ) value = marshal ? Marshal . dump ( value ) : value . to_s check_return_code ( Lib . memcached_add ( @struct , key , value , ttl , flags ) , key ) end
Add a key/value pair.
Add a key / value pair .
key
value
ttl
marshal
flags