Skip to main content

ISR Handler Config fields

Field-level reference for a subset of ISRHandlerConfig fields, plus the deprecated RenderConfig.modifyGeneratedHtml history. For the full field table see ISRHandlerConfig.

allowedQueryParams​

Specifies which query parameters are included in the cache key.

  • undefined: all query parameters are included in the cache key.
  • [] (empty array): no query parameters are included in the cache key.
  • string[]: only the listed query parameters are included in the cache key.
const isrHandlerConfig = {
allowedQueryParams: ['param1', 'param2'], // only 'param1' and 'param2' are part of the cache key
};

modifyGeneratedHtml​

note

This replaced the modifyGeneratedHtml property in RenderConfig, which is now @deprecated; see RenderConfig.

Hook into the generated HTML and apply modifications on-the-fly. Use with caution: it may cost performance on every serve. If not provided, the defaultModifyGeneratedHtml function is used, which only adds a comment to the HTML indicating when it was generated.

Type: ModifyHtmlCallbackFn.

backgroundRevalidation​

When true, the server serves the cached HTML as soon as possible and revalidates the cache in the background. This lets sites serve stale content when live backend APIs are down, slow, or rate-limited.

nonBlockingRender​

When true, the server returns the rendered HTML as soon as possible without waiting to store it in the cache storage first. This avoids client-side waiting times if the remote cache storage is down.


See also​