()
| 206 | createCursor(null); |
| 207 | |
| 208 | function peekCacheFromPool(): Cache | null { |
| 209 | // Check if the cache pool already has a cache we can use. |
| 210 | |
| 211 | // If we're rendering inside a Suspense boundary that is currently hidden, |
| 212 | // we should use the same cache that we used during the previous render, if |
| 213 | // one exists. |
| 214 | const cacheResumedFromPreviousRender = resumedCache.current; |
| 215 | if (cacheResumedFromPreviousRender !== null) { |
| 216 | return cacheResumedFromPreviousRender; |
| 217 | } |
| 218 | |
| 219 | // Otherwise, check the root's cache pool. |
| 220 | const root = (getWorkInProgressRoot(): any); |
| 221 | const cacheFromRootCachePool = root.pooledCache; |
| 222 | |
| 223 | return cacheFromRootCachePool; |
| 224 | } |
| 225 | |
| 226 | export function requestCacheFromPool(renderLanes: Lanes): Cache { |
| 227 | // Similar to previous function, except if there's not already a cache in the |
no test coverage detected