-
Notifications
You must be signed in to change notification settings - Fork 102
Description
Describe the bug
Currently OpenNext Cloudflare Adapter does not support revalidateTag with profile "max" / stale-while-revalidate.
This just does not work - it behaves like regular revalidateTag in Next.js 15, so all the requests that happen after execution of:
revalidateTag('<tag>', 'max')
are time consuming with cache MISS, while they should return stale data immediately and revalidate cache in the background.
Like in the similar issue I've created before ( #1052 ) - this functionality is confirmed to work this way on both self-hosted Next.js application and Next.js application hosted on Vercel.
Changes while comparing to previously reported issue for reference
Steps to reproduce
- Checkout branch next-16-d1-next-tag-cache-solution from reproduction repository
- Try to build and deploy code as per README
- Visit
https://<domain>/isrto render ISRed page - Call
https://<domain>/api/revalidate-data-cacheto revalidate data cache using revalidateTag method - Visit
https://<domain>/isrto render ISRed page
Expected behavior
Like on self-hosted Next.js application or in application deployed to Vercel - second visit to https://<domain>/isr should return markup immediately with STALE cache and should revalidate given path in the background, so subsequent requests will have up-to-date cache once it's revalidated.
@opennextjs/cloudflare version
1.14.7
Wrangler version
4.56.0
next info output
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000
Available memory (MB): 32768
Available CPU cores: 10
Binaries:
Node: 20.19.2
npm: 10.8.2
Yarn: 1.22.21
pnpm: 10.15.0
Relevant Packages:
next: 16.1.1 // Latest available version is detected (16.1.1).
eslint-config-next: 15.4.6
react: 19.1.4
react-dom: 19.1.4
typescript: 5.9.3
Next.js Config:
output: N/AAdditional context
It might be valuable to link this issue to Next16 support ticket