简体   繁体   English

IIS重置是否清除内存缓存?

[英]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.

相关问题 如何通过代码清除 Blazor webapp 的缓存内存 - how to clear cache memory of a Blazor webapp by code 如何以编程方式重置mongodb内存缓存 - How to reset mongodb memory cache programmatically 将文件的缓存同步到磁盘或清除内存中的文件的缓存 - Sync file's cache to the disk or clear the file's cache in the memory 如何在C#中清除IIS Windows身份验证缓存 - How to clear IIS Windows Authentication cache in C# Visual Studio 不清除错误列表缓存 - Visual Studio does not clear error list cache 通用Windows App Webview内存泄漏-清除缓存 - Universal Windows App Webview memory leak - clear cache 自动安装的内存缓存-是否存在? - Self-installing memory cache - does it exist? WCF 是否保留(生成的)Datacontracts 的缓存以及如何清除它 - Does WCF keep a cache of (generated) Datacontracts and how to clear it 如何清除WindowsPhone 7 中的图像缓存。将UriSource 设置为null 不起作用? 在 WP7 中清除图像缓存还有哪些其他变体? - How to clear image cache in WindowsPhone 7. Setting UriSource to null does not work! What other variants to clear image cache in WP7? 角色管理器是否为自定义角色提供程序缓存数据,是否可以清除此缓存? - Does the Roles Manager cache data for a custom roles provider, and can I clear this cache?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM