I'm going to hold some static variables inside my RestApi developed in C# ASP.NET MVC (extending ApiControllers).
I want to make sure that this static variables (which act as global variables) in my RestApi method be reinitialized every time a new API method is called. I want to know if web server keep static variables alive or not?
I want to make sure they will not keep alive for next method calls but I'm not sure how does static variables act in RestApis. I read few answers here and here but they seem contradicting and I don't know which one applies to ASP.NET MVC RestAPI too.