I have created an azure function with 2 HTTP triggers, now the issue I am facing is I need to store a value from the first HTTP trigger inside a dictionary like the one below
static Dictionary<int, TargetRequest> Target = new Dictionary<int, TargetRequest>();
This is inside my function class but outside the trigger.
Now after another HTTP trigger I need to retrieve that value from the dictionary and use it, but only after it's received a trigger. Being completely new to Azure I'm not sure if the values in that dictionary stay or not as it seems to work on localhost but not when deployed to Azure. If they don't, what is another way to go about this. Is using an Azure Queue Storage the way to store this value or is there another way to go about this?
Ps: TargetRequest is a c# class, if that makes any difference.
Cheers
question from:
https://stackoverflow.com/questions/66055574/can-you-store-a-value-in-a-global-dictionary-in-a-azure-function 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…