我对Memcache vs Memcached vs php5-memcache感到困惑 [英] I'm Confused with Memcache vs Memcached vs php5-memcache
问题描述
我按照此关于如何安装nginx,php和mysql(包括php5-memcache)的指南.
我想知道是否仍然需要安装不带"php5"前缀的内存缓存或内存缓存.
I'm wondering if I still need to install the memcache or memcached without the "php5" prefix .
截至目前,我的WordPress网站正在投诉ff:
As of now my WordPress site is complaining the 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冲突?还是对这两个版本的使用过于刻薄?
If it is needed to be installed, will it not conflict with php5-memcache? Or something like an overkill usage of the two version?
什么是最佳版本?是Memcache还是Memcached? php5-memcache或php5-memcached.
And what is the best version to use? Memcache or Memcached? php5-memcache or php5-memcached.
我听说带有"d"的内存缓存只是一个服务或守护程序.但是有人试图将两者与我在此处看到的内容进行比较.
I heard that memcached with "d" is just a service or daemon. But somebody is trying to compare the two as what I have seen here.
推荐答案
这些扩展名令人困惑.
实际上,php5-memcache和php5-memcached都是用于使用memcached服务的PHP扩展( Memcached服务器) .它们都使您的PHP进程能够成为memcached服务的客户端,即通过网络连接到memcached并说出memcached协议,以便使用memcached API.
Actually, both php5-memcache and php5-memcached are PHP extensions for working with the memcached service (Memcached server). They both give your PHP processes, the ability to be clients to the memcached service, i.e. to connect to memcached over the network, and to speak the memcached protocol, in order to use the memcached API.
我认为 php5-memcached扩展更稳定并且具有更多功能,因此,我建议应首先尝试使用它.它的大多数操作也是更快(用于生成这些结果的基准的php源).
The php5-memcached extension is more stable and has more features in my opinion, so I would suggest, that it should be tried first. Most of its operations are faster too (php source for the benchmark that produced these results).
您仍然需要从某个位置启动的实际 memcached 服务及其地址,以便连接到该服务.如果需要 Distributed 缓存,则可以在同一主机或另一台主机上启动memcached服务.
You still do need the actual memcached service started somewhere, and its address, in order to connect to it. The memcached service may be started on the same host, or on another host/hosts, if you want a distributed cache.
这篇关于我对Memcache vs Memcached vs php5-memcache感到困惑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!