|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jjwang at tudou dot com
New email:
PHP Version: OS:


 [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-2022 The PHP Group
All rights reserved.
Last updated: Sat Oct 01 18:05:55 2022 UTC