Replies: 1 comment 3 replies
-
Hi, I think the plan, as of today, for this use case is an API called It is more an escape hatch for when you eventually can't do as you describe with regular There's no plan to allow |
Beta Was this translation helpful? Give feedback.
3 replies
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.
-
Goals
Make 'use cache' to be adopted with less struggle
Background
There is docs page with an explanation why that happens:
That is not what I want indeed, however neither I expect it to throw.
The current alternative that docs also suggest is to copy needed cookies and pass it as variables. However, it's not always that easy since down the line you also have to read this values form variable.
Example of current struggle:
Proposal
An expected result would be to cache
headers()
andcookies()
inside'use cache'
as well, just use the first value for the cache and do not revalidate it (as if it were the first variable upon call)If that could be a confusing for someone, it could be configured via the flag.
Beta Was this translation helpful? Give feedback.
All reactions