framework icon indicating copy to clipboard operation
framework copied to clipboard

fix(nuxt): `initialCache: false` cache not deleted

Open HomWang opened this issue 3 years ago • 3 comments

🔗 Linked issue

❓ Type of change

  • [ ] 📖 Documentation (updates to the documentation or readme)
  • [x] 🐞 Bug fix (a non-breaking change that fixes an issue)
  • [x] 👌 Enhancement (improving an existing functionality like performance)
  • [ ] ✨ New feature (a non-breaking change that adds functionality)
  • [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

📝 Checklist

  • [x] I have linked an issue or discussion.
  • [ ] I have updated the documentation accordingly.

HomWang avatar Sep 06 '22 02:09 HomWang

Deploy Preview for nuxt3-docs canceled.

Name Link
Latest commit 10e4d87d80ed471904cb3b85a2c3a45364714d84
Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/63267ec9caea2800099e73d9

netlify[bot] avatar Sep 06 '22 02:09 netlify[bot]

https://github.com/nuxt/nuxt.js/issues/14813

HomWang avatar Sep 06 '22 02:09 HomWang

Solve the problem that cache data is not deleted when initialCache is false, and there is a large amount of invalid data, which will affect performance. Data should be deleted when onUnmounted to reduce stack and improve performance

HomWang avatar Sep 06 '22 02:09 HomWang

Hi, @516310460 sorry took long to check on this. The initial cache is disabled and removed (#8885).

Releasing data from memory is a good idea. Both from _asyncData and payload.data without cache. At this point, it might introduce unwanted regressions and we are close to the 3.0.0 release.

I have created nuxt/nuxt.js#15438 to not forget about this enhancement and will ping you after v3 release if interested to help on it.

pi0 avatar Nov 10 '22 13:11 pi0