打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
SAP Spartacus 服务器端渲染 timeout 和 forcedSsrTimeout 两个参数的区别

timeout

Time in milliseconds to wait for SSR rendering to happen.

It does not mean the actual duration spent by a SSR rendering request, but the range between the timestamp when SSR receives a render request and that request actually gets processed by SSR server.

等待 SSR 渲染发生的时间(以毫秒为单位)。

它并不意味着 SSR 渲染请求所花费的实际持续时间,而是 SSR 收到渲染请求时的时间戳与该请求实际被 SSR 服务器处理之间的范围。

forcedSsrTimeout

Time in milliseconds to wait for rendering when SSR_ALWAYS render strategy is set for the request.

Default value is 60 seconds.

in file optimized-ssr-engine.ts, we set a timer with timeout value specified by line 130, this.getTimeout function call:

为请求设置 SSR_ALWAYS 渲染策略时等待渲染的时间(以毫秒为单位)。

默认值为 60 秒。

在文件优化 ssr-engine.ts 中,我们设置了一个定时器,其超时值由第 130 行指定,this.getTimeout 函数调用:

The logic of final timeout value is determined as below:

  1. if request rendering strategy is specifed explicitly by customers to ALWAYS_SSR, then the timeout is coming from forcedSsrTimeout option. If customers specify ALWAYS_SSR but forget to fill forcedSsrTimeout, then 60 seconds is used as default value.

  2. In most cases customers will use RenderingStrategy.DEFAULT as default strategy. In this case, timeout value comes from option timeout.

In other words, forcedSsrTimeout only takes effect, if customer uses RenderingStrategy.ALWAYS_SSR.

  1. 如果客户明确指定了请求渲染策略到 ALWAYS_SSR,那么超时来自于forcedSsrTimeout 选项。 如果客户指定ALWAYS_SSR但忘记填写forcedSsrTimeout,则使用60秒作为默认值。

  2. 在大多数情况下,客户会使用 RenderingStrategy.DEFAULT 作为默认策略。 在这种情况下,超时值来自选项超时。

换句话说,只有在客户使用 RenderingStrategy.ALWAYS_SSR 时,forcedSsrTimeout 才会生效。

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
HTTP模块(二)
keepalived haproxy 实现web 双主模型的高可用负载均衡
HTTP | Node.js v13.14.0 Documentation
Nginx的超时timeout配置详解
ubuntu修改启动项及缩短启动时间
建表语句
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服