Skip to content

Nextjs 15.1 not saving Static Content on Redis on build time using instrumentation. #937

@joanaavelar

Description

@joanaavelar

Brief Description of the Bug
I was expecting to use instrumentation implementation and have Redis cache being populated with pre-rendered pages on build time, but it's only happening on start time. Besides that, I am unable to save the pre-rendered page if my page is on the root of the app, meaning app/page.tsx.

Severity
[Critical]

Frequency of Occurrence
[Always]

Steps to Reproduce

  • Update url from cache-handler with your Redis instance
  • yarn install
  • yarn build
  • Verify that no key exists for /index in Redis
  • yarn start
  • Verify that no key exists for /index in Redis, but /xpto in Redis exists
  • Go to the browser and open => http://localhost:3000/
  • Verify that /index key exists in Redis

Expected vs. Actual Behavior
I was expecting to have /index and /xpto after yarn build. I don't have anything being saved.
I was expecting to have /index also after yarn start. I only have /xpto being saved.

Screenshots/Logs
After yarn start
image
After accessing http://localhost:3000/
image

Environment:

  • @neshca/cache-handler version: [e.g., 1.9.9]
  • next version: [e.g., 15.1 and also 14.2.17]

Dependencies and Versions
I have a sample attached.

Attempted Solutions or Workarounds
No workarounds.

Impact of the Bug
I am unable to save my pre-rendered page on Redis if it's on app/page.tsx and it's only after yarn start and not after yarn build

Additional context
cache-test.zip

Sample attached.

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