drupflare/worker - v1.0.4
    Preparing search index...

    Function foldRenderWindow

    • Folds pending renders into the stored window, rolling it over when it has aged out.

      Rolls rather than accumulates, so a site that was busy last month cannot keep itself warm on it.

      Parameters

      • stored: RenderWindow | undefined
      • pending: number
      • nowMs: number
      • windowMs: number = RATE_WINDOW_MS
      • survived: boolean = false

        whether ONE incarnation spanned the window that is closing; see windowVerdict

      • pendingColds: number = 0
      • ceilingMs: number = DEFAULT_CEILING_MS
      • OptionallastAt: number

        when the newest of the pending renders arrived; kept from the stored window when absent

      Returns RenderWindow