Will the ASP.NET Application Pool utility update the cache on a static object?
I have an application that uses a cache for certain objects and this cache is implemented as static Dictionary
. I am considering using this code for a new ASP.NET project. Since the cache will be stored on the server and not every time the application is launched, I have to refresh the cache from time to time.
My question is this: will the reapplication pool utility rerun the static constructor of my class that sets the cache?
I don't know much about how application pools work, but in my opinion they "close" when the site is not accessed for a long time, and restart when accessed again. During this restart, will static objects be "created" again, or are they retained in memory during the "close" process?
source to share