(snapshot)
| 7299 | return out |
| 7300 | } |
| 7301 | const seed: CacheInternals["seed"] = (snapshot) => { |
| 7302 | const data = snapshotData(snapshot) |
| 7303 | // A per-request cache never refetches a settled entry, so a seed there would be final. |
| 7304 | if (disposed || settleOnce || data === undefined) return false |
| 7305 | // Never from a value that may never have been saved. |
| 7306 | if ( |
| 7307 | data.patched || data.argsKey === undefined || |
| 7308 | data.result?._tag !== "Success" |
| 7309 | ) return false |
| 7310 | const def = register(data.def) |
| 7311 | const existing = lookup(def, data.argsKey) |
| 7312 | if (existing?.result !== undefined) return false |
| 7313 | const entry = existing ?? ensureEntry(def, data.args, data.argsKey) |
| 7314 | entry.result = AsyncResult.success(data.result.value, { |
| 7315 | timestamp: data.result.timestamp |
| 7316 | }) |
| 7317 | entry.settledAt = now() |
| 7318 | entry.invalidated = true |
| 7319 | afterQuiet(entry) |
| 7320 | return true |
| 7321 | } |
| 7322 | |
| 7323 | // -- host signals ----------------------------------------------------------- |
| 7324 | /** One synchronous pass over watched entries, on a false-to-true edge with both signals then true. */ |
nothing calls this directly
no test coverage detected