Skip to content

Fix: don't use cache on next-data #6150

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

Closed
wants to merge 1 commit into from
Closed

Fix: don't use cache on next-data #6150

wants to merge 1 commit into from

Conversation

AugustinMauroy
Copy link
Member

@AugustinMauroy AugustinMauroy commented Nov 30, 2023

Description

The bug on issues it's just because next use "old" cache.

Nextjs doc

Validation

it's should work as expected

Related Issues

#6148

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npx turbo lint to ensure the code follows the style guide. And run npx turbo lint:fix to fix the style errors if necessary.
  • I have run npx turbo format to ensure the code follows the style guide.
  • I have run npx turbo test to check if all tests are passing.
  • NA I've covered new added functionality with unit tests if necessary.

Copy link

vercel bot commented Nov 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 30, 2023 4:15pm

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. No. If you disable cache it means every edge function needs to request the data every time.

This should not be done. You could simply make the cache expire. But no cache is a tremendous bad solution.

@AugustinMauroy
Copy link
Member Author

You could simply make the cache expire

after 1 or 2 days?

@ovflowd
Copy link
Member

ovflowd commented Nov 30, 2023

You could simply make the cache expire

after 1 or 2 days?

No. Just a few minutes. The point here is to prevent the server from being hammered. A few minutes cache is enough because an invalidation happens only once per-path.

@ovflowd
Copy link
Member

ovflowd commented Nov 30, 2023

Superseeded by #6153

@ovflowd ovflowd closed this Nov 30, 2023
@AugustinMauroy AugustinMauroy deleted the fix#6148 branch January 15, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants