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

    Function withDeadline

    • Resolves p, or undefined once the deadline passes.

      A KV get cannot be cancelled, so the caller hands the late read to waitUntil and its answer still warms this isolate.

      Type Parameters

      • T

      Parameters

      • p: Promise<T>
      • ms: number = COLD_READ_DEADLINE_MS

      Returns Promise<T | undefined>