(entry: Entry, build: Build)
| 6457 | |
| 6458 | /** Waits for the stored fetch, starting one when none is in flight. */ |
| 6459 | const getStored = (entry: Entry, build: Build): Effect.Effect<any, any> => |
| 6460 | Effect.callback<any, any>((resume) => { |
| 6461 | const waiter: Waiter = { build, resume, shared: undefined } |
| 6462 | entry.waiters.add(waiter) |
| 6463 | cancelIdle(entry) |
| 6464 | // During a list's append, the walk it waits for is owed. |
| 6465 | if (entry.fetch?.append) entry.owed ??= "get" |
| 6466 | // A reconnecting stream's next element answers it. |
| 6467 | if (entry.live === undefined) ensureFetch(entry, "get", build) |
| 6468 | return Effect.sync(() => leave(entry, waiter)) |
| 6469 | }) |
| 6470 | |
| 6471 | // The order of checks: own target, hydration window, live patch, staleness. |
| 6472 | const get: CacheInternals["get"] = (def, args, fetcher, run, parent) => |
no test coverage detected