docs: document client-side caching patterns for getCachedData#34304
docs: document client-side caching patterns for getCachedData#34304benjamincanac wants to merge 2 commits intonuxt:mainfrom
Conversation
|
|
WalkthroughThis pull request updates Nuxt documentation to reflect changes to Possibly related PRs
π₯ Pre-merge checks | β 3β Passed checks (3 passed)
βοΈ Tip: You can configure your own custom pre-merge checks in the settings. β¨ Finishing touchesπ§ͺ Generate unit tests (beta)
No actionable comments were generated in the recent review. π Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |

π Linked issue
Related: #24271 #31816
π Description
With Nuxt 4 defaulting to
purgeCachedDataandgranularCachedData, data is no longer cached across client-side navigations. I ran into this on Volta and had to dig through the source to understand what changed.This PR adds a "Client-side Caching" section to the data fetching guide with two patterns (cache until refresh and stale-while-revalidate), updates the
getDefaultCachedDatasnippet in the API docs to match the actual source, and adds a migration step in the upgrade guide.