Replies: 3 comments
-
I was also wondering about that - it would be great to support something in that direction 🤔 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm facing this issue too.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi, is there a plan to fix or get a workaround on this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
Background
For me at least, in a typical use case, the asynchronous requests to make from React Server Components are not REST: they are GraphQL, gRPC, direct CRUD of the database via Prisma, etc.
However, in App Router, you can only utilize the cache control feature of the
fetch()
function when calling simple HTTP-based endpoints (so-called REST-style)I know
cache()
function, but it only supports request deduping, not ISR/SG cache control.It would be a shame if the fine-grained cache control of the
fetch()
function is actually useless in most use cases.Proposal
How about add support ISR/SG cache control feature to
cache()
function?It might be more practical to create some module like
next/cache
which wraps react'scache()
function.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions