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

Cache getUser and resolvePermissionsForUser #152

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

markspolakovs
Copy link
Member

This should speed up cases where we get the user multiple times per request (eg #150's new user stuff).

@jenkins-ystv
Copy link

jenkins-ystv bot commented Sep 11, 2024

Deployed a preview of this PR to https://pr-152-internal.dev.ystv.co.uk

@archessmn
Copy link
Member

Am I wrong in thinking this would be better suited for the Next.js unstable_cache? Makes it easier for us to do cache invalidation in the future.

@markspolakovs
Copy link
Member Author

Maybe - I reckon we start with this and maybe later move to u_c. cache is scoped for one request while unstable_cache persists longer (so we need to think about invalidation, which we don't now).

Copy link
Member

@archessmn archessmn left a comment

Choose a reason for hiding this comment

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

That makes sense 👍

@markspolakovs markspolakovs merged commit 8dd2058 into main Sep 12, 2024
3 of 4 checks passed
@markspolakovs markspolakovs deleted the mp/cache-getuser-and-resolvepermissions branch September 12, 2024 17:41
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