Hello, i want to lock my action in controller, because in this action i read and write a .json file saved in my website.
if action is "lock" go in for loop with System.Threading.Thread.Sleep, there is a better solution ?
I think to use application variables but there is HttpContext.Session not HttpContext.Application ...
Better use other variable ? like cache ? private IMemoryCache _cache _cache.TryGetValue etc ?
thank's