From 94ced7273733153b61905384cd6f5c73c1cc759a Mon Sep 17 00:00:00 2001 From: James Date: Mon, 10 Mar 2025 08:13:44 +0000 Subject: [PATCH] update docs for revalidation service binding --- pages/cloudflare/caching.mdx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pages/cloudflare/caching.mdx b/pages/cloudflare/caching.mdx index e41a6a1..14c3d55 100644 --- a/pages/cloudflare/caching.mdx +++ b/pages/cloudflare/caching.mdx @@ -30,7 +30,7 @@ The ISR adapter for Cloudflare uses [Workers KV](https://developers.cloudflare.c npx wrangler@latest kv namespace create ``` -##### 2. Add the KV namespace to your Worker +##### 2. Add the KV namespace and Service Binding to your Worker The binding name used in your app's worker is `NEXT_CACHE_WORKERS_KV`. @@ -44,6 +44,12 @@ The binding name used in your app's worker is `NEXT_CACHE_WORKERS_KV`. "id": "", }, ], + "services": [ + { + "binding": "NEXT_CACHE_REVALIDATION_WORKER", + "service": "", + }, + ], } ``` @@ -85,7 +91,7 @@ To use on-demand revalidation, you should also follow the [ISR setup steps](#inc If your app **only** uses the pages router, it does not need to have a tag cache and should skip this step. -##### 1. Create a D1 database +##### 1. Create a D1 database and Service Binding The binding name used in your app's worker is `NEXT_CACHE_D1`. @@ -100,6 +106,12 @@ The binding name used in your app's worker is `NEXT_CACHE_D1`. "database_name": "", }, ], + "services": [ + { + "binding": "NEXT_CACHE_REVALIDATION_WORKER", + "service": "", + }, + ], } ```