HttpContext.Current.Cache - When does it automatically clear?

In my Web Forms application, I use HttpContext.Current.Cache to store some information that different forms use, so as not to go into db every time.

My question is: when will it be cleaned? Or will he stay there until I delete it through the code or restart IIS?

+7
source share
1 answer

The cache remains in memory until the process is stopped.

Thus, resetting IIS or reusing the application pool will also clear the cache.

+10
source

All Articles