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

    Function drainPageMirrors

    • Pushes queued pages to R2.

      Reads the HTML out of cfw_page at drain time rather than storing a copy in the queue, so the queue stays small and a page re-rendered between queue and drain mirrors its CURRENT bytes.

      Parameters

      • sql: PageMirrorSql
      • bucket: MirrorBucket | null | undefined
      • readPage: (path: string) => MirrorablePage | null

        looks a path up in cfw_page; returns null when the row is gone

      • opts: { hits?: ReadonlyMap<string, number> | null; limit?: number; site?: string } = {}

      Returns Promise<PageMirrorDrain>