我遵循了这个 tutorial 中的说明关于如何安装 nginx、php 和 mysql,包括 php5-memcache。
我想知道我是否还需要安装没有“php5”前缀的 memcache 或 memcached。
截至目前,我的 WordPress 网站正在提示 ff:
The following memcached servers are not responding or not running:
Page Cache: 127.0.0.1:11211.
Database Cache: 127.0.0.1:11211.
Object Cache: 127.0.0.1:11211.
This message will automatically disappear once the issue is resolved.
如果需要安装,会不会和php5-memcache冲突?或者像两个版本的过度使用?
最好使用什么版本?内存缓存还是内存缓存? php5-memcache 或 php5-memcached。
我听说带“d”的memcached只是一个服务或守护进程。但有人正试图将两者进行比较,正如我所看到的那样here .
最佳答案
这些扩展的名称令人困惑。
实际上,php5-memcache 和 php5-memcached 都是用于使用 memcached 服务的 PHP 扩展 (Memcached server)。它们都为您的 PHP 进程提供成为 memcached 服务客户端的能力,即通过网络连接到 memcached,并使用 memcached 协议(protocol),以便使用 memcached API。
在我看来,php5-memcached 扩展更稳定并且功能更多,所以我建议,应该先试用它。它的大部分操作是faster也是 ( php source for the benchmark that produced these results )。
您仍然需要在某处启动的实际 memcached 服务及其地址才能连接到它。如果您需要分布式缓存,可以在同一主机或另一台/多台主机上启动 memcached 服务。
关于php - 我对 Memcache、Memcached 和 php5-memcache 感到困惑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17122655/