Inconsistent cached values #87066
Unanswered
tsoos99dev
asked this question in
Help
Replies: 1 comment 1 reply
-
|
Hiyo, I took a quick look, I think there's something up with the browser cache. In production only, if you disable cache (in devTools network tool), can you reproduce staleness? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'm experimenting with use cache, but it's behaving unexpectedly.
I'm trying to imitate what would happen on a dashboard when I want to refresh a specific value. I'm tagging the refreshable component with a unique value via cacheTag, then I call updateTag(id) in a server action from a different component which uses useActionState to keep track of the interaction. The action itself simply waits a random amount of time and returns a random number.
In dev:
The good:
The bad:
In build:
The good:
The bad:
What am I doing wrong?
Additional information
Example
https://github.com/tsoos99dev/next-playground
Beta Was this translation helpful? Give feedback.
All reactions