How does localStorage cache work for Netlify sites?

I have a lambda function that receives post from Stripe and I do a localstorage of a customer id in that lambda function.

But when I try to retrieve it later on via ajax call to another lambda function, that localstorage is not there. It works when I am testing on localhost on my own machine but when I deploy, I cannot retrieve the localstorage item in the AJAX call. The localstorage created via ajax call to lambda call is different than localstorage created on domain site itself.

Again, it works when I am testing it on my local dev environment. But once deployed, it doesnt seem to be able to create localstorage when done via lambda function.

Anything I am doing wrong?

Hey @designlook,
Can you please share your Netlify url and your function code?