In an ASP.Net Core 1.1 Web API, I need to store some global information that must be accessible across all controllers. So when the client calls a certain endpoint on the API, a certain variable (a Dictionary) must be set, which will be read from all other controllers. From what I've seen, it's apparently a bad idea to use global static variables? Could maybe someone tell me why, and what is a better alternative? I've heard about using configuration files or cache... Any recommendations? Thanks
↧