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 错误。
即使 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 秒。