能够在不清除缓存的情况下重新加载 Magento 站点配置中的更改

发布于 2025-01-03 05:06:25 字数 255 浏览 1 评论 0原文

今天我处理了一项任务,将模块的配置加载到正在重负载下运行的 Magento 站点中。我复制了新模块的 config.xml 文件和所有内容来解决一些问题。

我们的 Magento 与 memcached 缓存后端一起运行。

为了让模块运行,我必须完全清除缓存,这对网站的性能有影响,我们有 500 个并发用户。因此,我正在寻找如何在不清除缓存的情况下部署配置更改的解决方案。

有吗?

感谢您的任何想法和想法。

贾罗。

today I dealt with a task to load a module's configuration into running Magento site under heavy load. I copied config.xml file of new module and everything to fix some issue.

Our Magento runs with memcached caching backend.

To have a module running I had to clear cache completly and that had an impack on performance of the site, we had 500 of concurent users . So I'm looking for solution how to deploy changes in of configuration without clearing cache.

Is there any?

Thanks for any thoughts and ideas.

Jaro.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

红焚 2025-01-10 05:06:26

在安装模块或更改其配置时,您始终必须刷新缓存。这对于强制重新读取配置、清空不兼容的操作码并强制 Magento 重新读取应用程序代码和模板以进行刚刚所做的更改是必要的。

是的,它会对您网站的性能产生暂时的影响,但如果您不这样做,可能会导致一些非常有趣的问题。

我遇到过使用管理中的按钮还不够的情况,对于模块安装,最好的做法可能是将系统置于维护模式,确保所有管理会话都已注销,检查每个人都已退出,然后手动删除 var /缓存/法师--?文件夹。然后,您重新登录一个管理会话,让它运行,直到您看到管理会话已启动,然后退出,然后返回管理,开始检查站点是否有新安装模块的完整功能。

对于缓存刷新就足够的简单配置更改来说,这当然是多余的。

有关清除 Magento 缓存的详细信息

You will always have to flush cache when installing a module or changing its configurations. This is necessary to force rereading of configurations, to empty out incompatible opcode and force Magento to re-read application code and templates for the changes you have just made.

Yes, it has a momentary impact on your site's performance, but can cause some really interesting issues if you don't.

I've had situations where using the button in Admin wasn't enough, for module installs, it's probably best practice to put the system in maintenance mode, make sure all admin sessions are logged out, check that everyone's out and then manually delete var/cache/mage--? folders. You then log back in on one admin session, let it run till you see an admin session has started, log back out and then back into Admin to start checking the site for full function of the freshly installed module.

This is of course overkill for simple config changes where a cache flush is sufficient.

More info on clearing the cache in Magento

笨笨の傻瓜 2025-01-10 05:06:25

这是更新配置缓存而不是清除它的方法,从而避免竞争条件。

https://gist.github.com/2715268

Here is a method of updating the config cache rather than clearing it, thus avoiding race-conditions.

https://gist.github.com/2715268

〆凄凉。 2025-01-10 05:06:25

您不必清除整个缓存来加载模块的配置。您可以使用Flush Magento Cache*选项安装该模块。最终,您需要清除缓存才能查看前端更改(如果有)。最大限度地减少性能影响的最佳方法是在非高峰或低使用时间清除它。

*已编辑 - 感谢Fiasco Labs

You don't have to clear the entire cache to load a module's configuration. You can install the module by using the Flush Magento Cache* option. Eventually you'll need to clear the cache to see your front-end changes if any were made. The best thing to do to minimize performance impact is to clear it during off-peak or low-usage times.

*edited - Thanks Fiasco Labs

十六岁半 2025-01-10 05:06:25

最好的做法可能是将系统置于维护模式,确保所有管理会话都已注销,检查每个人都已退出,然后手动删除 var/cache/mage--?文件夹。然后,您重新登录一个管理会话,让它运行,直到您看到管理会话已启动,然后退出,然后返回管理,开始检查站点是否有新安装模块的完整功能。

it's probably best practice to put the system in maintenance mode, make sure all admin sessions are logged out, check that everyone's out and then manually delete var/cache/mage--? folders. You then log back in on one admin session, let it run till you see an admin session has started, log back out and then back into Admin to start checking the site for full function of the freshly installed module.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文