{"record":{"id":"5f329c61c3957231","repo":"facebook/react","slug":"a-cache-instance-was-released-after-it-was-already","errorCode":null,"errorMessage":"A cache instance was released after it was already freed. This likely indicates a bug in React.","messagePattern":"A cache instance was released after it was already freed\\. This likely indicates a bug in React\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/react-reconciler/src/ReactFiberCacheComponent.js","lineNumber":107,"sourceCode":"\nexport function retainCache(cache: Cache) {\n  if (__DEV__) {\n    if (cache.controller.signal.aborted) {\n      console.warn(\n        'A cache instance was retained after it was already freed. ' +\n          'This likely indicates a bug in React.',\n      );\n    }\n  }\n  cache.refCount++;\n}\n\n// Cleanup a cache instance, potentially freeing it if there are no more references\nexport function releaseCache(cache: Cache) {\n  cache.refCount--;\n  if (__DEV__) {\n    if (cache.refCount < 0) {\n      console.warn(\n        'A cache instance was released after it was already freed. ' +\n          'This likely indicates a bug in React.',\n      );\n    }\n  }\n  if (cache.refCount === 0) {\n    scheduleCallback(NormalPriority, () => {\n      cache.controller.abort();\n    });\n  }\n}\n\nexport function pushCacheProvider(workInProgress: Fiber, cache: Cache) {\n  pushProvider(workInProgress, CacheContext, cache);\n}\n\nexport function popCacheProvider(workInProgress: Fiber, cache: Cache) {\n  popProvider(CacheContext, workInProgress);","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-reconciler/src/ReactFiberCacheComponent.js#L89-L125","documentation":"Error \"A cache instance was released after it was already freed. This likely indicates a bug in React.\" thrown in facebook/react.","triggerScenarios":"Thrown at packages/react-reconciler/src/ReactFiberCacheComponent.js:107 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}