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

Fix code samples in caching doc #11329

Closed
cannikin opened this issue Aug 21, 2024 · 0 comments · Fixed by #11331
Closed

Fix code samples in caching doc #11329

cannikin opened this issue Aug 21, 2024 · 0 comments · Fixed by #11331
Assignees

Comments

@cannikin
Copy link
Member

cannikin commented Aug 21, 2024

There's a code snippet:

const post = ({ id }) => {
  cache('posts', () => {
    return db.post.findMany()
  })
})

Which technically works, but is confusing as to why it's the singular post function that actually returns all posts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants