Skip to content

After resetServerList() funcation call, couldn't add/set any value in the Memcached object #504

@rmanidev

Description

@rmanidev

Hi,

We configured Memcached for DB cache, it was working fine in without persistence connection,
If we enabled the persistence connection, it's not working correctly. We have updated the latest version also but not working correctly the details are mentioned below.

PHP Version 7.2.14
memcached Version 3.1.3
libmemcached version 1.0.18

I'm using the libmemcached 1.0.18 version . I have an issue on this after resetserverlist() the Memcached object is not supported properly and the sample code is mentioned below :

$m = new \Memcached('persistent_id');

$m->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);

var_dump($m->addServer($host, $port, '1'));
echo "<br>server List: ";var_dump($m->getServerList());
echo "<br>Reset Server Status: ";var_dump($m->resetServerList());
echo "<br>Add Server Status: ";var_dump($m->addServer($host, $port, '2'));
echo "<br>Server List: ";var_dump($m->getServerList());

Error Result is:

Reset Server Status: bool(true)
Add Server Status: bool(false)
Server List: array(0) { }

After resetServerList() function is not working properly.

how to solve this problem?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions