简体   繁体   中英

Does an IIS Reset clear Memory Cache?

I've recently setup some caching for multiple websites that uses MemoryCache . The item I'm adding is a dataset and has an absolute expiry of 12 hours from the time it's added. What I want to know though, is there a way of clearing the cache manually, such as an IIS reset?

I couldn't find anything that categorically specified that memory cache would be cleared.

The reason behind this is that I need to test whether refreshed data in the database is picked up as expected if the cache is cleared. At the moment it doesn't seem to be clearing for all websites, which seems odd. So I need to figure out if this could be an issue with the app pools not restarting properly etc.

From my experiences and from peoples comments to back this up, it appears that it essentially does. The problem I was facing was actually an app pool not restarting properly, which lead to me thinking it hadn't cleared. It was actually an issue with the app pool.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM