any memcached fans?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi guys,

Have you noticed the add, set, and replace functions of the PHP
memcached extension?

I'm trying to figure out if there's any difference between set,  and
(add or replace).

After few tests, I've proven myself that the set() method is enough to
add a new variable or update it.

Is there any functionality difference between add and set that I'm
missing here?


Vladimir /

Re: any memcached fans?

Quoted text here. Click to load it

Set will overwrite any data that is in cache if its already there, and
will add a new item if its not there.
Add will only add a new item to cache where the key doesn't already
Replace will only replace an item that is existing in cache, it won't
add new items.

Chander Ganesan
Open Technology Group, Inc.
One Copley Parkway, Suite 210
Morrisville, NC  27560
Ask me about Expert PHP Training - delivered on-site worldwide or via
open enrollment public courses.

Site Timeline