asp.net - 如何在不重新启动应用程序的情况下清除网站的输出缓存

标签 asp.net outputcache

有没有办法在不重启的情况下清除或重置整个网站的输出缓存?

我刚刚开始在网站上使用 outputcache,当我在设置它时出错时,我需要一个页面,我可以浏览到该页面将重置它。

最佳答案

这应该可以解决问题:

Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)

 Dim path As String
 path="/AbosoluteVirtualPath/OutputCached.aspx"
 HttpResponse.RemoveOutputCacheItem(path)

End Sub

关于asp.net - 如何在不重新启动应用程序的情况下清除网站的输出缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37101/

相关文章:

asp.net - IIS(动态和静态)缓存、OutPutCache 和浏览器缓存有什么区别

c# - 自定义 OutputCache 提供程序在 Add() 和 Set() 上生成不同的键

asp.net-mvc - MVC 中的多个 OutputCache

c# - 10,000 多条 html 记录可快速呈现

asp.net - 应用程序状态变量在网络场服务器中工作正常吗

javascript - 如何使用 javascript 在两个 html 表格的中间添加阴影曲线?

c# - 模型是否包含字段而不将其添加到数据库?

asp.net-mvc-3 - OutputCache 和自定义 gzip 压缩过滤器

.net - MVC 5 中的 "CacheProfile"

asp.net - 从 Asp.Net Webmethod 获取 Json 数据并在 angularJS 中使用