docs: add note regarding cookie caching and RSC

This commit is contained in:
Kyle
2025-05-13 02:41:10 +12:00
committed by GitHub
parent 6e03d06a99
commit 50b79324b2

View File

@@ -91,6 +91,8 @@ export async function ServerComponent() {
}
```
<Callout type="warn">As RSCs cannot set cookies, the [cookie cache](/docs/concepts/session-management#cookie-cache) will not be refreshed until the server is interacted with from the client via Server Actions or Route Handlers.</Callout>
### Server Action Cookies
When you call a function that needs to set cookies, like `signInEmail` or `signUpEmail` in a server action, cookies wont be set. This is because server actions need to use the `cookies` helper from Next.js to set cookies.