add() & set()

howard chen howachen at
Tue Oct 24 02:57:57 UTC 2006


from the web:

set -- unconditionally sets a given key with a given value
(update_foo() should use this)
add -- adds to the cache, only if it doesn't already exist (get_foo()
should use this)

is that add() is faster than set() ?

since in most case, set() is enough, even for get_foo()


More information about the memcached mailing list