php example:
<?php
$memcache = new Memcache;
$memcache->addServer('localhost', 21201);
$memcache->set('key1',7);
$memcache->increment('key1',2);
echo "key1=>".$memcache->get('key1') ."\n";
$memcache->increment('key1',2);
echo "key1=>".$memcache->get('key1') ."\n";
?>
result:
key1=>9
PHP Notice: get(): marked server 'localhost:21201' as failed in ...
key1=>
telnet differencies:
Telneting into memcached 1.2.2
root@x:~# telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost
Escape character is '^]'.
add aa 0 0 1
9
STORED
incr aa 1
10
get aa
VALUE aa 0 2
10
END
Telneting into memcachedb 1.0.0
root@x:~# telnet localhost 21201
Trying 127.0.0.1...
Connected to localhost
Escape character is '^]'.
add aa 0 0 1
9
STORED
incr aa 1
10
get aa
VALUE aa 0 1
10
END
There's a notable difference between the response from the servers on the
second get
memcached replies with "VALUE aa 0 2"
memcachedb replies with "VALUE aa 0 1" (number of bytes differs)
What version of the product are you using? On what operating system?
Berkeley DB 4.6.18
libevent 1.4.0-beta
memcachedb-1.0.0-beta
Linux
Original issue reported on code.google.com by cocorult...@gmail.com on 19 Feb 2008 at 4:06
Original issue reported on code.google.com by
cocorult...@gmail.com
on 19 Feb 2008 at 4:06