If you c开发者_高级运维all the following
$m = new Memcache()
$m->addServer('127.0.0.1')
$m->delete('key')
you will get
PHP Notice: MemcachePool::delete(): Server localhost (tcp 11211, udp 0) failed with: CLIENT_ERROR bad command line format. Usage: delete [noreply]
As @fratrik said, passing 0 as second argument will make the function work.
But this is a workaround, the real problem is an incompatibility between the versions of the php-memcache extension and the memcache server.
It is explained here
Worry not. Despite what is said at the manual, explicitly passing a timeout of 0
will fix the problem.
精彩评论