note 97603 modified in memcached.cas by danbrown

From: Date: Tue, 27 Apr 2010 20:20:31 +0000
Subject: note 97603 modified in memcached.cas by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-168736@lists.php.net to get a copy of this message
Watch out! When using binary protocol, the expected result after cas() is 21 (Memcached::RES_END). For example, to make the above example #1 work with binary protocol, use the following: <?php $m = new Memcached(); $m->addServer('localhost', 11211); $m->setOption(Memcached::OPT_BINARY_PROTOCOL,true) // [...] } else { $ips[] = $_SERVER['REMOTE_ADDR']; $m->cas($cas, 'ip_block', $ips); } } while ($m->getResultCode() != Memcached::RES_END); ?> --was-- Watch out! When using binary protocol, the expected result after cas() is 21 (Memcached::RES_END). For example, to make the above example #1 work with binary protocol, use the following: <?php $m = new Memcached(); $m->addServer('localhost', 11211); $m->setOption(Memcached::OPT_BINARY_PROTOCOL,true) // [...] } else { $ips[] = $_SERVER['REMOTE_ADDR']; $m->cas($cas, 'ip_block', $ips); } } while ($m->getResultCode() != Memcached::RES_END); http://php.net/manual/en/memcached.cas.php

« previous php.notes (#168736) next »