2008-08-31 20 views

Trả lời

9

này nên làm như lừa:

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 
+5

Câu trả lời này không thực tế xóa bộ nhớ cache cho "toàn bộ trang web" như được chỉ định trong câu hỏi ban đầu. –

0

Thêm mã sau đây để điều khiển hoặc mã trang:

HttpContext.Cache.Insert("Page", 1); 
Response.AddCacheItemDependency("Page"); 

Để xóa sản lượng cachne sử dụng lệnh sau đây trong điều khiển:

HttpContext.Cache.Remove("Page"); 
Các vấn đề liên quan