Margie.chen
Margie.chen

Reputation: 11

Twilio - Use global variable in a call

We can deliver a variable to the function by TwiML, but it's have size/length limit. So I have to save this variable to global, so I can get this variable in anywhere(function) I want. But I'm worry if the variable will be changed by some others, because our function in twilio is serverless. In fact, global variable is not safe. Anyone can solve this?

Upvotes: 0

Views: 309

Answers (1)

Alan
Alan

Reputation: 10771

There are no variables in Functions, where state is shared across executions as you stated. You will need to use an external datastore for state between executions, if that is a requirement.

Upvotes: 2

Related Questions