Deduping function calls on the server?
Is there any method for deduping calls on the server? I have a
getSession function that I'm calling in several serverFns in the same SSR pass, and I'd like it to be invoked only once.
I tried to create a cache on the request, i.e. sessionCache.get(getWebRequest()), but seems like the returned request does not have a stable identity.
Is there anything else unique to cache by that will hold across a whole SSR pass?2 Replies
sensitive-blue•4mo ago
we'll have something for that soon. you will be able to store data per request
other-emeraldOP•4mo ago
Good to hear!