同时安装并启用Memcache和Memcached

我可以在同一台服务器上同时使用MemcacheMemcached php扩展吗? 只是要清楚,所以你不要误解我的意思是这个问题,这是我的情况:我有我的网站Joomla和phpbb。 Joomla提供对memcachedmemcache的支持,因为phpbb只支持memcache。 所以我打算这样做:

1)安装memcached服务器: apt-get install memcached

2)安装php-memcache用于phpbb: apt-get install php5-memcache

3)安装php-memcached用于Joomla: apt-get install php5-memcached

我的问题是:

  1. 安装并启用memcache和memcached扩展,可以同时使用不同的php应用程序吗? 这会以任何方式冲突吗?

  2. 当我在/etc/memcached.conf中将memcached服务器的内存限制设置为512M时,是否意味着这个内存限制将在memcachememcached扩展之间共享? 这应该是一个问题,如果说memcache比memcached使用更多的内存,反之亦然? 他们都玩对方好吗?

  3. 在这样的情况下,我应该试着优先考虑只有1个PHP扩展(如只在我的情况下的任何memcache),以保持简单而没有两者之间的冲突,或者它不应该。 我的意思是,如果你们说可以同时使用这两个版本(第一季度版本),那么即使两者都可以同时使用,我还是应该使用相同的php扩展名来同时使用Joomla和phpbb如果可能,以最大限度地减less头痛? 这会在任何方面有所作为吗?

@Alin Andrei为这个问题贴出了正确的答案。 我在这里引用他的话,因为答案隐藏在评论中。 信贷给他:

 1. memcache and memcached are two separate extensions that do not depend on each other so yes you can have them both installed. 2. if both extensions use the same memcached server, then yes the memory is shared between them, you can keys from both extensions but only the size of 512 3. if you can use the same extension on both apps then use only one to simplify the complexity you have. You could both of them as well, i dont think it will increase in size if you use both of them