【发布时间】:2012-12-24 00:05:07
【问题描述】:
我似乎找不到 PHP 的 MemcacheD 扩展。
php_memcache.dll有几个编译,但不一样。
我缺少的主要是 getMulti(),它在 Memcache 中不存在。
到目前为止,我找到了这个,但没有 DLL:
【问题讨论】:
我似乎找不到 PHP 的 MemcacheD 扩展。
php_memcache.dll有几个编译,但不一样。
我缺少的主要是 getMulti(),它在 Memcache 中不存在。
到目前为止,我找到了这个,但没有 DLL:
【问题讨论】:
我知道 memcached 还有一些其他的功能,但它的界面与 memcache 扩展的界面几乎相同。你可以很容易地摆脱这样的代码,就我而言,它运行得很好。如果您没有加载 memcached,请创建此文件:
<?php
class Memcached {
const OPT_LIBKETAMA_COMPATIBLE = true;
const OPT_COMPRESSION = true;
const OPT_NO_BLOCK = true;
//if you code relies on any other constants define them to avoid
//undefined constant notice
//http://www.php.net/manual/en/memcached.constants.php
public $_instance;
public function __construct() {
$this->_instance = new Memcache;
}
public function __call($name, $args) {
return call_user_func_array(array($this->_instance, $name), $args);
}
public function setOption() {}
}
要么包含它,要么配置自动加载器来获取它。 当然,您需要正确配置的 memcache 实例和 addServer 调用,但如果代码库假定 Memcached,则此类调用应该已经在代码中。 我希望它可以帮助某人/
【讨论】:
正式 - 它不存在。不过,有几个人创建了自己的 DLL。这是一个创建 dll 的人的博客:
http://trondn.blogspot.com/2010/07/libmemcached-on-win32.html
这里是包含源代码的存储库的链接,因此您可以为 memcached 构建自己的 DLL:
http://bazaar.launchpad.net/~trond-norbye/libmemcached/mingw32/files
【讨论】: