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•2w ago
we'll have something for that soon. you will be able to store data per request
environmental-roseOP•2w ago
Good to hear!