Cache the getSession result for SvelteKit #8795
pauldemarco
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Background
Often times, we are awaiting
getSession
multiple times throughout the single request.Like in this authorization middleware:
Then it happens again in the
/api/protected
route (since we need access to session data):Proposal
Would it be beneficial to cache the result with something like:
Beta Was this translation helpful? Give feedback.
All reactions