Can I individually contain application cache settings(created through static classes) based by application

StackOverflow https://stackoverflow.com/questions/20412240

  •  29-08-2022
  •  | 
  •  

Question

Good Afternoon:

My project is escalating and so there are new requirement. Currently In IIS we create an Application Pool with 4 applications each for each website I install for each of our locations.

My website caches settings from static classes that get populated by DB calls. These settings contain data for time zone, css classes, database name, etc which are all individual to each site I create.

Now we want to unify what makes sense to standardize while keeping the individual settings so from now on, we are going to have only 1 global application pool with 4 applications that will be shared by each site I install.

It is my understanding that any static classes that are cached in the app cache can potentially be used by any application in the pool. Since I have a class called GlobalSettings where I can call Get("website") method, I need to find out if it is possible for me to keep these cached settings individually even though they will be cached in the same application pool?

I appreciate your help and/or any suggestion as how to accomplish this.

Thank you

Was it helpful?

Solution

If you have static classes you don't have to cache them anywhere. Each application will have it's 'instance' of that static class. Applications won't share it even if they run in same application pool.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top