MCPcopy
hub / github.com/vercel/next.js / cacheReady

Method cacheReady

packages/next/src/server/app-render/cache-signal.ts:88–95  ·  view source on GitHub ↗

* If there are inflight cache reads this Promise can resolve in a microtask however * if there are no inflight cache reads then we wait at least one task to allow initial * cache reads to be initiated.

()

Source from the content-addressed store, hash-verified

86 * cache reads to be initiated.
87 */
88 cacheReady() {
89 return new Promise<void>((resolve) => {
90 this.listeners.push(resolve)
91 if (this.count === 0) {
92 this.noMorePendingCaches()
93 }
94 })
95 }
96
97 beginRead() {
98 this.count++

Calls 2

noMorePendingCachesMethod · 0.95
pushMethod · 0.65

Tested by

no test coverage detected