[英]Does an IIS Reset clear Memory Cache?
I've recently setup some caching for multiple websites that uses MemoryCache . 我最近为使用MemoryCache的多个网站设置了一些缓存。 The item I'm adding is a dataset and has an absolute expiry of 12 hours from the time it's added. 我正在添加的项目是一个数据集,其添加时间为12小时。 What I want to know though, is there a way of clearing the cache manually, such as an IIS reset? 我想知道的是,有没有办法手动清除缓存,例如IIS重置?
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. 这实际上是应用程序池的一个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.