Skip to content

Custom cacheHandler doesn't revalidate page by revalidatePath #78095

@eposha

Description

@eposha

Link to the code that reproduces this issue

https://github.com/eposha/cache-handler-revalidate-path

To Reproduce

  1. Set up a cache handler (Implementing the same functions as the example)
  2. npm run build
  3. npm start
  4. open browser on http://localhost:3000/
  5. Try to Path revalidate and Unstable revalidate
  6. Look at the terminal

Current vs. Expected behavior

Current behavior - Receive TypeError: Cannot read properties of undefined (reading 'some')
Expecte behavior - Revalidate path and unstable_cache

I think the problem is that the cached html page doesn't include the tag

Provide environment information

Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 24.4.0: Wed Mar 19 21:16:34 PDT 2025; root:xnu-11417.101.15~1/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 10
Binaries:
  Node: 22.14.0
  npm: 11.2.0
  Yarn: 1.22.10
  pnpm: 8.8.0
Relevant Packages:
  next: 15.3.0 // Latest available version is detected (15.3.0).
  eslint-config-next: 15.3.0
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.8.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

next start (local)

Additional context

If you add export const dynamic = force-dynamic to page then unstable_cache will revalidate the request as expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions