php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69809 memcache get always modify flag parameter
Submitted: 2015-06-12 09:50 UTC Modified: -
From: bburnichon at gmail dot com Assigned:
Status: Open Package: memcache (PECL)
PHP Version: 5.5.26 OS: Mac OS X
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:
Package:
Bug Type:
Summary:
From: bburnichon at gmail dot com
New email:
PHP Version: OS:

 

 [2015-06-12 09:50 UTC] bburnichon at gmail dot com
Description:
------------
In an application I'm in charge of, some booleans are cached, The only way to know whether false returned is an actual hit is to check whether the flag value was changed.

It works perfectly on a vagrant debian 7 but not in native OSX installation.

memcache

memcache support => enabled
Active persistent connections => 0
Version => 2.2.7
Revision => $Revision: 327750 $

Directive => Local Value => Master Value
memcache.allow_failover => 1 => 1
memcache.chunk_size => 8192 => 8192
memcache.default_port => 11211 => 11211
memcache.default_timeout_ms => 1000 => 1000
memcache.hash_function => crc32 => crc32
memcache.hash_strategy => standard => standard
memcache.max_failover_attempts => 20 => 20


Test script:
---------------
$memcache = new Memcache();
$memcache->connect('localhost', 11211);
$memcache->flush();
$flag = null; var_dump($memcache->get('foo', $flag), $flag);


Expected result:
----------------
bool(false)
NULL

Actual result:
--------------
bool(false)
int(0)

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Dec 06 06:01:23 2019 UTC