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

Next Cache never expires with Pages Router #389

Closed
SapientMatt opened this issue Mar 20, 2024 · 5 comments
Closed

Next Cache never expires with Pages Router #389

SapientMatt opened this issue Mar 20, 2024 · 5 comments
Labels
need reproduction This issue need a reproduction in order to be fixed

Comments

@SapientMatt
Copy link

SapientMatt commented Mar 20, 2024

Hi,

I'm currently attempting to use ISR, without on demand invalidation, where my pages are supposed to expire after 10 minutes.
I can see the cloudfront cache expire and it coming to next, however next never seems to regenerate the page no matter how long I wait.
Deleting all files with the _cache/ prefix in the app bucket seems to force this regeneration to occur.

Additionally, there never seem to be any entries added to the dynmaodb table.

On next 13.5.6 and opennext 2.3.5

@conico974
Copy link
Contributor

conico974 commented Mar 20, 2024

Page router don't use dynamodb
How are you deploying ? With sst ?
What are the X-Nextjs-Cache, Cache-Control and X-Cache headers for your stale pages ?
You're not building on windows ?

@SapientMatt
Copy link
Author

SapientMatt commented Mar 20, 2024 via email

@conico974
Copy link
Contributor

Try adding x-prerender-revalidate to the list of allowed cache policy headers in cloudfront.
There is a PR for that already sst/sst#3713
You can do it in the aws console for testing.

FYI open-next doesn't work on windows #385

If this doesn't solve the issue, you'll need to create a minimum repro

@fwang
Copy link
Contributor

fwang commented Mar 20, 2024

just chiming in. PR is merged. 2.41.3 should have x-prerender-revalidate included in the allowed headers.

@conico974 conico974 added the need reproduction This issue need a reproduction in order to be fixed label Jun 1, 2024
@conico974
Copy link
Contributor

I'm going to close this old issue.
If that's still an issue, reopen and provide a reproduction

@conico974 conico974 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need reproduction This issue need a reproduction in order to be fixed
Projects
None yet
Development

No branches or pull requests

3 participants