Php Memcached 的 PAYLOAD_FAILURE 错误以及如何在与 php-memcached 兼容的 perl 中设置值

Php Memcached's PAYLOAD_FAILURE error and how to set value in perl compatible to php-memcached

我正在尝试使用 PHP 的 MemcacheD 扩展 GET 较早存储的数据,但收到 Memcached::RES_PAYLOAD_FAILURE 说无法序列化数据。根据 official php manual,这似乎是压缩或序列化问题。

Memcached::RES_PAYLOAD_FAILURE

Payload failure: could not compress/decompress or serialize/unserialize the value.

但是给定的数据是一个 Json 值,通过 Telnet 我可以得到 JSON 数据

数据是使用 Cache::Memcached::Fast 的 Perl 批处理设置的,之前使用 php memcache 可以读取,但现在使用 php memcached 则不能。

关于错误,如前所述:on php doc 2 个扩展 memcache 和 memcacheD 在混合时似乎不兼容,但我不确定是不是真正的问题。

You can't safely switch between memcache and memcached without a either a cache flush or isolated cache environments.

所以我的问题是

  1. 真的是PHP的Memcache和Memcached不兼容的问题导致这个错误吗?
  2. 如果是这样,为了修复它,我愿意从 perl 设置数据,但如何设置与 PHP memcached
  3. 兼容的数据

注意:由于PHP7,我不能使用Memcache,我想用Memcached。

php-memcache 和 php-memcacheD 不兼容,所以这是不可能的。