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

Docs: Improve caching story #73437

Open
wants to merge 34 commits into
base: canary
Choose a base branch
from

Conversation

delbaoliveira
Copy link
Contributor

@delbaoliveira delbaoliveira commented Dec 2, 2024

Cache Rules Everything Around Me 🍦

@ijjk ijjk added created-by: Next.js DevEx team PRs by the DX team. Documentation Related to Next.js' official documentation. labels Dec 2, 2024
Copy link
Contributor

github-actions bot commented Dec 2, 2024

All broken links are now fixed, thank you!

@delbaoliveira delbaoliveira marked this pull request as ready for review December 11, 2024 13:57
return data.json()
}
```

Copy link
Member

Choose a reason for hiding this comment

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

Maybe again: There will be two separate entries into the cache. One for getPosts and another for getPostsBySlug, where the cache will be invalidated if the slug argument changes.

Copy link
Contributor Author

@delbaoliveira delbaoliveira Dec 17, 2024

Choose a reason for hiding this comment

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

For the invalidated part, wouldn't it be two separate entries? A cache key is the function's unique id + the arguments?
https://vercel.slack.com/archives/C06QRHBQ742/p1730766893478919?thread_ts=1730765761.544979&cid=C06QRHBQ742

@delbaoliveira delbaoliveira changed the title Getting Started docs: Caching and Revalidating Docs: Improve caching story Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
created-by: Next.js DevEx team PRs by the DX team. Documentation Related to Next.js' official documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants