缓存 smarty 视图渲染

发布于 2024-09-13 03:07:44 字数 178 浏览 3 评论 0原文

我正在使用 Yii 框架并使用 smarty 视图渲染。我必须使用 simpleXML_load_file 来加载 simpleXML 元素,并且无法使用 Yii 提供的 memcache 的数据缓存来缓存它。所以我认为可能是使用 smarty 的缓存而不是缓存数据。这里有人在 Yii 框架中缓存 smarty 页面给我一些建议,非常感谢!

I'm working with Yii framework and using smarty view render. I have to working with simpleXML_load_file to load simpleXML element and it's can not be cache using data caching with memcache provided by Yii. So I think may be using cache of smarty instead of caching data. Anyone here had caching smarty page in Yii framework give me some advises, thank a lot!

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

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

发布评论

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

评论(1

苏大泽ㄣ 2024-09-20 03:07:44
  1. 我认为数据缓存没有理由不适用于 SimpleXML 元素。
  2. 您可以尝试使用全页缓存
  3. 您可以为片段缓存定义自己的Smarty标签。
  1. I see no reason data cache will not work with SimpleXML element.
  2. You can try using full page cache.
  3. You can define your own Smarty tags for fragment cache.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文