I am using Visual Studio 2019 to develop an ASP.Net web API. In an API controller that provides data to user, I used HttpContext.Current.Application.Contents to work as data cache between different requests and different routes. The motivation of using HttpContext.Current.Application.Contents is to cache the data fetch/computed in previously incoming request. In most of the requests the API will just get data from HttpContext.Current.Application.Contents instead of fetching them from back-end, but in some requests the cache data will be cleaned up or initialized. Because multiple requests can be handled at the same time, how can I avoid race condition on using HttpContext.Current.Application.Contents?