I'm planning my caching strategy and I'm digging into ESI to see if it fits my needs.
我正在计划我的缓存策略,我正在深入研究ESI以确定它是否符合我的需求。
Today these questions arose:
今天出现了这些问题:
- Is each include executed in serial or parallel? Say I have 5 of these:
{% render '...' with {}, {'standalone': true} %}
. I understand that the resulting page will have to wait for all of them, but the time it will take, will it be similar to the slowest of the includes, or will it be similar to the sum of all those includes? - 每个包含是以串行还是并行方式执行的?假设我有其中的5个:{%render'...'with {},{'standalone':true}%}。我知道生成的页面必须等待所有这些页面,但是它需要的时间,它是否与包含中最慢的页面类似,或者它是否与所有这些包含的总和相似?
- If the answer is 'serial', is there a way to turn it into parallel?
- 如果答案是“连续”,有没有办法将其变为并行?
- Am I better off just using Ajax for the user-specific parts of the website? In which cases would you pick one or the other?
- 我最好只使用Ajax用于网站的用户特定部分吗?在哪种情况下你会挑选一个或另一个?
1 个解决方案
#1
4
ESI with varnish is always executed in serial. They put alot of work on improving ESI with varnish 3, but still no change in that aspect. I also remember seeing some response from varnish staff saying that the feature was on their wishlist but was a tricky one to implement.
带有清漆的ESI总是以串行方式执行。他们在使用清漆3改进ESI方面做了大量工作,但在这方面仍然没有变化。我还记得看到一些清漆工作人员的回复说这个功能在他们的愿望清单上,但实施起来却很棘手。
For making paralell now I guess the only option would be to implement the feature yourself.
为了使paralell现在,我想唯一的选择是自己实现该功能。
As for Ajax vs ESI I would say the break point goes later than 5 ESI as long as they can be rendered quickly by your backend. Ajax always has the drawback of being bad SEO if used for content parts of your site.
至于Ajax vs ESI我会说断点比5 ESI晚,只要它们可以由你的后端快速渲染。如果用于网站的内容部分,Ajax总是存在不良搜索引擎优化的缺点。
#1
4
ESI with varnish is always executed in serial. They put alot of work on improving ESI with varnish 3, but still no change in that aspect. I also remember seeing some response from varnish staff saying that the feature was on their wishlist but was a tricky one to implement.
带有清漆的ESI总是以串行方式执行。他们在使用清漆3改进ESI方面做了大量工作,但在这方面仍然没有变化。我还记得看到一些清漆工作人员的回复说这个功能在他们的愿望清单上,但实施起来却很棘手。
For making paralell now I guess the only option would be to implement the feature yourself.
为了使paralell现在,我想唯一的选择是自己实现该功能。
As for Ajax vs ESI I would say the break point goes later than 5 ESI as long as they can be rendered quickly by your backend. Ajax always has the drawback of being bad SEO if used for content parts of your site.
至于Ajax vs ESI我会说断点比5 ESI晚,只要它们可以由你的后端快速渲染。如果用于网站的内容部分,Ajax总是存在不良搜索引擎优化的缺点。