日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

SAP Spartacus 服务器端渲染优化引擎的参数 SsrOptimizationOptions

發布時間:2023/12/19 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SAP Spartacus 服务器端渲染优化引擎的参数 SsrOptimizationOptions 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
  • timeout?: number - Time in milliseconds to wait for SSR rendering to happen.單位毫秒,等待 SSR 渲染發生的時間間隔。

  • cache?: boolean - Enable in-memory cache for pre-rendered urls.If disabled, the cache will still be used to temporarily store renders finished after csr fallback in order to serve them with next request only.

啟用提前渲染 url 的內存中緩存。如果禁用,仍然會使用緩存來存儲回退到 CSR 渲染機制下生成的頁面,并服務于且僅服務于下一次到來的請求。

  • cacheSize?: number - Specified number of entries that will be kept in cache, allows to keep memory usage under control.

指定能夠存儲在緩存里的記錄條目數,防止出現 out of memory 錯誤。

Can also be use when cache option is set to false. It will then limit the number of renders that timeouts and are kept in temporary cache, waiting to be served with next request.

即使 cache 設置為 false,也能夠使用 cacheSize 選項。當 cache 為 false 時,cacheSize 可以用來限制臨時緩存里的 render 個數,這些 render 都是出現了超時情況,等待下次請求到來時繼續服務。

  • concurrency?: number - Limit number of concurrent rendering

  • ttl?: number - Time in milliseconds after prerendered page is becoming stale and should be rendered again.

ttl 時間間隔達到后,之前渲染好的頁面被標識為過期狀態,需要重新渲染。

  • renderKeyResolver?: (req: Request) => string - Allows overriding default key generator for custom differentiating between rendered pages. By default it uses req.originalUrl.

允許客戶自定義渲染頁面的標識鍵。默認情況下,使用字段 req.originalUrl 來標識不同的渲染頁面。

  • renderingStrategyResolver?: (req: Request) => RenderingStrategy - Allows defining custom rendering strategy per request

相當于鉤子函數,允許根據請求來自定義渲染策略。

  • forcedSsrTimeout?: number - Time in milliseconds to wait for rendering when SSR_ALWAYS render strategy is set for the request.Default value is 60 seconds.

當渲染策略設置成 SSR_ALWAYS 時,渲染的超時時間。默認是 60 秒。

總結

以上是生活随笔為你收集整理的SAP Spartacus 服务器端渲染优化引擎的参数 SsrOptimizationOptions的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。