(cache: Cache)
| 88 | } |
| 89 | |
| 90 | export function retainCache(cache: Cache) { |
| 91 | if (__DEV__) { |
| 92 | if (cache.controller.signal.aborted) { |
| 93 | console.warn( |
| 94 | 'A cache instance was retained after it was already freed. ' + |
| 95 | 'This likely indicates a bug in React.', |
| 96 | ); |
| 97 | } |
| 98 | } |
| 99 | cache.refCount++; |
| 100 | } |
| 101 | |
| 102 | // Cleanup a cache instance, potentially freeing it if there are no more references |
| 103 | export function releaseCache(cache: Cache) { |
no outgoing calls
no test coverage detected