AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 639701
Accepted
Neel
Neel
Asked: 2014-10-27 00:11:11 +0800 CST2014-10-27 00:11:11 +0800 CST 2014-10-27 00:11:11 +0800 CST

同时安装和启用 Memcache 和 Memcached

  • 772

我可以在同一台服务器上同时使用Memcache和Memcached php 扩展吗?为了清楚起见,您不会误解我的意思,这是我的情况:我的网站同时拥有 Joomla 和 phpbb。Joomla 提供对 memcached 和 memcache 的支持,而 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. 当我将 memcached 服务器的内存限制设置为 512M in 时 /etc/memcached.conf,是否意味着此内存限制将在两个扩展memcache之间共享?memcached如果说 memcache 使用比 memcached 更多的内存,这应该不是问题,反之亦然?他们两个玩得很好吗?

  3. 在这样的场景中,我是否应该尝试只优先使用 1 个 php 扩展(比如我的情况下的任何一个 memcache),以保持事情简单而不会在两者之间发生冲突,否则这无关紧要。我的意思是,如果您说两者都可以使用(对于 Q1),那么出于专业实践,即使两者可以同时使用,我是否仍然尝试对 Joomla 和使用相同的 php 扩展phpbb 是否可以尽量减少头痛?这会有什么不同吗?

memcached
  • 1 1 个回答
  • 1160 Views

1 个回答

  • Voted
  1. Best Answer
    Neel
    2017-02-10T11:00:00+08:002017-02-10T11:00:00+08:00

    @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
    
    • 0

相关问题

  • 应该使用哪个 PHP(操作码)缓存,为什么?

  • 使用多台服务器为网站提供服务的速度缺点是什么?

  • 快速查询大型数据集:MySQL MEMORY (HEAP) 引擎、MyISAM 或其他东西(例如 MemCached)

  • nginx 和 memcached 协同工作的效果如何?

  • “<service_name> 已死,但子系统已锁定”是什么意思?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve