The page has functionality that updates the data, and I use
refreshNuxtData(CacheKeys.inbox)
refreshNuxtData(CacheKeys.inbox)
to refresh the cache. This works perfectly while I stay on the same page.
However, here's where it breaks:
1. User views page with data 2. User triggers an update (data gets modified in backend) 3. I call refreshNuxtData(CacheKeys.inbox) - works correctly, shows fresh data 4. User navigates to different page 5. User navigates back to original page
Problem: The page shows the old data from before the update happened, not the refreshed data
It seems like when I navigate away and come back, Nuxt is serving the cached data from before the refresh occurred, completely ignoring that refreshNuxtData was called.
My Questions What's the recommended way to handle this scenario? Should the cache persist through navigation changes even after explicit refresh calls?