add() & set()

Brad Fitzpatrick brad at danga.com
Tue Oct 24 03:39:34 UTC 2006


Same speed.

Use whichever's appropriate for your needs.


On Tue, 24 Oct 2006, howard chen wrote:

> hi,
>
> 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()
>
> thanks.
>
>


More information about the memcached mailing list