从应用程序之外清除Asp.Net缓存(不使用源$ C ​​$ C)

问题描述:

我有一个asp.net web应用程序和我使用的缓存(HttpRuntime.Cache),以保存从数据库的一些东西。

I have a asp.net web application and I'm using cache (HttpRuntime.Cache) to save some stuff from db.

我也随时更新分贝时间,以便在DB数据并不在我的应用程序的缓存相匹配的数据。

I also update db from time to time so that data in db does not match the data in my application's cache.

有什么办法如何清除我的应用程序的缓存,而无需修改任何来源$ C ​​$ C或再版的页面?

Is there any way how to clear my application's cache without modifying any source code or republishing the page?

我试图重新启动IIS并清除浏览器缓存,但没有什么帮助。

I tried to restart IIS and to clear browsers cache but nothing helps.

请帮忙。

重新启动IIS将工作 - 因为高速缓存保存在内存中。如果你正在使用SQL Server,你可以设置一个缓存依赖自动过期缓存当SQL Server更新。

Restarting IIS will work - since the cache is kept in memory. If you're using SQL Server you can set up a cache dependency to automatically expire your cache when SQL Server is updated.

http://msdn.microsoft.com/en-us/library/ ms178604.aspx