From ecbe787eec91e933cbd75704c7b3c6559f1264b4 Mon Sep 17 00:00:00 2001 From: Cody Lundquist Date: Sat, 17 Feb 2024 13:57:40 -0800 Subject: [PATCH] Update unstable_cache.mdx with important info about dynamic data --- docs/02-app/02-api-reference/04-functions/unstable_cache.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/02-app/02-api-reference/04-functions/unstable_cache.mdx b/docs/02-app/02-api-reference/04-functions/unstable_cache.mdx index 9fb0626564738..5fce7c14a681c 100644 --- a/docs/02-app/02-api-reference/04-functions/unstable_cache.mdx +++ b/docs/02-app/02-api-reference/04-functions/unstable_cache.mdx @@ -20,6 +20,9 @@ export default async function Component({ userID }) { } ``` +> **Good to know**: +> Accessing dynamic data sources such as `headers` or `cookies` inside a cache scope is not supported. If you need this data inside a cached function use `headers` oustide of the cached function and pass the required dynamic data in as an argument. + > **Warning**: This API is unstable and may change in the future. We will provide migration documentation and codemods, if needed, as this API stabilizes. ## Parameters