|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57945 can't get cas value
Submitted: 2007-12-02 22:21 UTC Modified: 2008-01-09 15:47 UTC
From: jjwang at tudou dot com Assigned:
Status: Not a bug Package: memcache (PECL)
PHP Version: 5.2.1 OS: CentOS 5
Private report: No CVE-ID: None
 [2007-12-02 22:21 UTC] jjwang at tudou dot com
The version of memcached is 1.2.4-rc2, I can't get flags and cas value using get() method of MemcachePool, and also the cas () method.
I know from the doc of memcached that, it supports two get command, get and gets, but I can only found one get() method in memcache-3.0.0. Does the two commands are the same?

Reproduce code:
$memcache = new MemcachePool();
$memcache->addServer('', 11211, 11200);


if (!($value = $memcache->get($key, $flags, $cas))) {
    echo "error: get, key-$key" . "<br />\n";
} else {
    echo "ok: get, key-$key value-$value flags-$flags cas-$cas" . "<br />\n";

Actual result:
ok: get, key-key_rbmyuysh value-value_czsjelml flags- cas-


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-09 15:47 UTC] mikael at synd dot info
Please read the API docs in the README, for example

Also, ensure that you have the latest versions of pecl/memcache (3.0.0) and memcached (1.2.4). The script below works fine for me

$m = new Memcache();
$m->set('foo', 'bar', 16);

$flags = null;
$cas = null;
$m->get('foo', $var, $var2);

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 25 11:01:30 2024 UTC