Skylos wrote: > > $mc->delete($key,$val); > unless ($mc->add($key,$val2)) { > $mc->replace($key, $val2); > } > Be careful of doing things like this. You create the potential for a race condition if another process gets a request in between each of these functions. memcached provides several atomic operations to avoid such problems.