I'm using in my project many counters by memcached:
$data = $mc->set('sasa', 100);
$data = $mc->get('sasa');
var_dump($data);
$res = $mc->add('sasa', 100);
var_dump($res);
result is
int(100)
bool(false)
int(100)
If I use memcached native protocol:
get sasa
VALUE sasa 1 3
100
END
add sasa 0 0 1
1
NOT_STORE
get sasa
VALUE sasa 1 3
100
END
ADD command is not work. https://github.com/memcached/memcached/blob/master/doc/protocol.txt#L132
Do You know, how to use ADD command in the memcached?