How can I flush the cache in ASP.NET
Posted on 2008-10-14
I am relatively new in ASP.NET, trying all sort of things.
I had my first web site published (photo gallery) but wanted to improve performance because the images were slow to load so I tried the cache for the first time and set the duration of the cached pages to 24 hours.
My initial page used to be a "Welcome.aspx" page which is not cached. It contains a LoginStatus control and a LoginView control. This page was always the first to appear on the site. Now, But now the Default.aspx page shows up first althought the user has not been authenticated and despite the fact the code in the page upload directs unauthenticated users to the Welcome.aspx page.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If User.Identity.IsAuthenticated = False Then
For now I need to flush the cache and see if this would restore the situation to what it was but I am not sure how to do that.
Thanks for your help