Skip to content

[BUG] Next.js 16.2.3 / opennextjs-cloudflare 1.19.0 - revalidateTag with profile "max" / stale-while-revalidate does not work #1185

@grabmateusz

Description

@grabmateusz

Describe the bug

Currently OpenNext Cloudflare Adapter does not support revalidateTag with profile "max" / stale-while-revalidate.
After recent changes execution of:

revalidateTag('', 'max')

does not affect instance at all, silently, without any form of log that would allow to track down the issue. Request to revalidation endpoint returns 200, revalidateTag('<tag>', 'max') is executed, but ISRed route still returns "HIT"

Issue was originally created as #1058 but was prematurely closed.

This functionality is confirmed to work this way on both self-hosted Next.js application and Next.js application hosted on Vercel.

Steps to reproduce

Checkout branch next-16-d1-next-tag-cache-solution-opennextjs-cloudflare-1-19-0 from reproduction repository
Try to build and deploy code as per README
Visit https:///isr to render ISRed page
Call https:///api/revalidate-data-cache to revalidate data cache using revalidateTag method
Visit https:///isr to render ISRed page

Expected behavior

Like on self-hosted Next.js application or in application deployed to Vercel - second visit to https:///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.19.0

Wrangler version

4.81.1

next info output

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.3.0: Wed Jan 28 20:53:15 PST 2026; root:xnu-12377.81.4~5/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 22.21.1
  npm: 10.9.4
  Yarn: 1.22.21
  pnpm: N/A
Relevant Packages:
  next: 16.2.3 // Latest available version is detected (16.2.3).
  eslint-config-next: 15.4.6
  react: 19.1.4
  react-dom: 19.1.4
  typescript: 5.9.3
Next.js Config:
  output: N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions