Set force-cache when using cookie #57846
Unanswered
J4v4Scr1pt
asked this question in
Help
Replies: 1 comment 5 replies
-
Hello @J4v4Scr1pt , what did you end up doing? I am in a similar situation, but the |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
The issue is that during the migration period we need to get a cookie containing the user session for AspNetCore.
And we need to provide this cookie on every fetch to our api.
I have created a custom GET function to reduce DRY.
But because I use cookies() NextJs opt-out of caching the request. Which is not desirble in this case.
To fix this I just force the cache and this works.
Except the obvious one that all calls will be cached now are there any drawbacks doing this?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions