Replies: 1 comment 1 reply
-
Hi @ellemedit , The behavior you're observing with the In the second example, when you use This behavior highlights the complexity of deduplication in concurrent scenarios, and while it may seem inconsistent, it's a known aspect of how caching operates in Next.js. Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
This route handler response with same cached result as
getTest()
cached.But this doesn't. It returns all different number by getTest for first time. After caching, it returns same number.
I think it's hard to deduplicate on multi-instance as state sharing is a difficult problem. But even same process or request, it doesn't deduplicate. Or this is unexpected pattern?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions