从应用程序之外清除Asp.Net缓存(不使用源$ C ​​$ C) [英] Clear Asp.Net cache from outside of application (not using source code)

查看:132
本文介绍了从应用程序之外清除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

这篇关于从应用程序之外清除Asp.Net缓存(不使用源$ C ​​$ C)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆