Removing cache items (VB.net) : Response Cache « Response « ASP.Net






Removing cache items (VB.net)

<%@ Page Language="vb" %>
<html>
   <head>
      <title>Removing cache items in ASP.NET</title>
      <script runat="server">
         Sub Page_Load()
            Cache("Key1") = "foo"
            Response.RemoveOutputCacheItem(Request.Path)
            If Not Cache("Key1") Is Nothing Then
               Message.Text = Cache("Key1")
            Else
               Message.Text = "Cache items for " & Request.Path & _
                  " removed."
            End If
         End Sub
      </script>
   </head>
<body>
   <asp:label id="Message" runat="server"/>
</body>
</html>
           
       








Related examples in the same category

1.Change Http Cache Policy (VB.net)
2.Cache control: Expires (VB.net)
3.Cache control: Expires Absolute (VB.net)