Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vercel Deployment: Cache Revalidation Failure in Next.js #74150

Open
gentritbiba opened this issue Dec 19, 2024 · 0 comments
Open

Vercel Deployment: Cache Revalidation Failure in Next.js #74150

gentritbiba opened this issue Dec 19, 2024 · 0 comments
Labels
bug Issue was opened via the bug report template. dynamicIO Related to dynamicIO.

Comments

@gentritbiba
Copy link

gentritbiba commented Dec 19, 2024

Link to the code that reproduces this issue

https://github.com/gentritbiba/caching-test

To Reproduce

  1. Build and run the application locally.

    • Verify that the application builds successfully.
    • Start the development server.
  2. Test local cache revalidation

    • Click the "Refresh Time" button.
    • Verify that the cache is properly revalidated.
  3. Deploy the application to Vercel

    • Push code to your repository.
    • Trigger a Vercel deployment.
  4. Test cache revalidation in production.

    • Click the "Refresh Time" button.
    • Notice how the cache does not revalidate.

Current vs. Expected behavior

##Current
It works locally, it doesn't on Vercel deployment.

##Expected
Should work on Vercel just as it work locally.

Provide environment information

Environment Details

Platform: Vercel
Framework: Next.js 15.1.1-canary.6
Deployment Type: Serverless
Caching Method: unstable_cacheTag() with "use cache"

Local Detals:
Operating System:
  Platform: linux
  Arch: x64
  Version: #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec  5 13:09:44 UTC 2024
  Available memory (MB): 31230
  Available CPU cores: 16
Binaries:
  Node: 22.10.0
  npm: 10.9.0
  Yarn: N/A
  pnpm: 9.15.0
Relevant Packages:
  next: 15.1.1-canary.6 // There is a newer canary version (15.1.1-canary.13) available, please upgrade! 
  eslint-config-next: 15.1.1-canary.6
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.2
Next.js Config:
    dynamicIO: true,
    ppr: 'incremental',
    reactCompiler: true,
    authInterrupts: true,

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

dynamicIO

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

Vercel (Deployed)

Additional context

Overview

The issue involves unexpected behavior with cache revalidation when deploying a Next.js application using the new useCache method with cacheTag() on Vercel's production environment.

Detailed Problem Description

Cache revalidation fails specifically in the Vercel production deployment, while working correctly in local and Docker container environments. This suggests a potential platform-specific compatibility issue with Next.js's experimental caching API.

Here is an example deployment: https://caching-test-orcin.vercel.app/

@gentritbiba gentritbiba added the bug Issue was opened via the bug report template. label Dec 19, 2024
@github-actions github-actions bot added the dynamicIO Related to dynamicIO. label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. dynamicIO Related to dynamicIO.
Projects
None yet
Development

No branches or pull requests

1 participant