Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Caching doesn't work correctly with latest rc #575

Closed
max-frai opened this issue Oct 23, 2023 · 1 comment
Closed

Caching doesn't work correctly with latest rc #575

max-frai opened this issue Oct 23, 2023 · 1 comment
Labels
bug Something isn't working unconfirmed Needs triage.

Comments

@max-frai
Copy link

Description

You have on landing page link to example which uses "latest" tag in package.json and everything is okay.
When I migrate app to 3.0.0-rc.6 there is a problem with correct caching headers.
With example from landing on production build I see the following headers:

Cache-Control: s-maxage=31536000, stale-while-revalidate

But with rc6 header is:

Cache-Control: private, no-cache, no-store, max-age=0, must-revalidate

Of course, this makes app very slow because nextjs doesn't cache ssr, etc and recalculates everything on each request.

I build a small example with rc6 which after yarn run build and yarn start on main page gives this wrong cache-control header.

Mandatory reproduction URL (CodeSandbox or GitHub repository)

https://github.com/max-frai/nextintl-cache-problem

Reproduction description

Steps to reproduce:

  1. yarn
  2. yarn run build
  3. yarn run start
  4. Open localhost:3000/en
  5. Watch Cache-Control header

Expected behaviour

With production build and all default values for caching it should return the following header: Cache-Control: s-maxage=31536000, stale-while-revalidate

@max-frai max-frai added bug Something isn't working unconfirmed Needs triage. labels Oct 23, 2023
@amannn
Copy link
Owner

amannn commented Oct 24, 2023

I think you're looking for this: https://next-intl-docs-git-feat-next-13-rsc-next-intl.vercel.app/docs/getting-started/app-router#static-rendering

I'll move this to a discussion, since this appears to be a usage question.

Repository owner locked and limited conversation to collaborators Oct 24, 2023
@amannn amannn converted this issue into discussion #576 Oct 24, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants