(
targets,
invalidateOptions
)
| 6638 | } |
| 6639 | } |
| 6640 | const invalidate: CacheInternals["invalidate"] = ( |
| 6641 | targets, |
| 6642 | invalidateOptions |
| 6643 | ) => { |
| 6644 | if (disposed) return |
| 6645 | registerTargets(targets) |
| 6646 | if (settleOnce) { |
| 6647 | if (invalidateOptions?.byHand === true) { |
| 6648 | const named = targets.find((target) => isQuery(target) || target._tag === "Entry") |
| 6649 | const query = named === undefined |
| 6650 | ? undefined |
| 6651 | : isQuery(named) |
| 6652 | ? defOf(named).name |
| 6653 | : defOf((named as EntryTarget).query).name |
| 6654 | report( |
| 6655 | new InvalidateIgnored({ |
| 6656 | query, |
| 6657 | message: "[Query] invalidate" + |
| 6658 | (query === undefined ? "" : " of " + quote(query)) + |
| 6659 | " was called on a per-request server cache, where it does nothing." |
| 6660 | }) |
| 6661 | ) |
| 6662 | } |
| 6663 | return |
| 6664 | } |
| 6665 | const parent = invalidateOptions?.parent |
| 6666 | for (const entry of resolve(compileTargets(targets))) { |
| 6667 | invalidateEntry(entry, "invalidation", parent) |
| 6668 | } |
| 6669 | } |
| 6670 | |
| 6671 | // -- runs, patches and writes ----------------------------------------------- |
| 6672 | /** The check made when a run's patches stop being live on an entry: a refetch that was held back. */ |
nothing calls this directly
no test coverage detected