> Hi All,
> I have just enabled output caching on a page, the URL is:
> Menu2.aspx?user=simon
> My page/outputcache directives are:
> <%@ Page Language="vb" AutoEventWireup="false"
> Codebehind="Menu.aspx.vb" Inherits="OldInfra.Menu" Trace="true"
> enableviewstate="False"%>
> <%@ OutputCache Duration="60" VaryByParam="user" %>
> After enabling outputcache, I did not see any improvement in
> performance, so I added this to the page:
> Page Generated: <%=Now()%>
> ...which always outputs a different time, so I guess this proves it
> isnt working? Is there anything else I need to do?
> THanks,
> Simon.
Set the Trace attribute to false.
Setting the trace attribute will help, but it doesn't exactly answer
the question.
Simon, perhaps you need to have to test to see if caching the user is
worth the effort to begin with.
But an even broader question: how do you know you're not seeing any
improvement in performance?
<%=Now%> will always output the time, but I'm under the assumption
you're running it at the beginning of the page and at the end of the
page, right?
Anyway, these guys may be a better help to you then me. Here's a solid
article on caching in ASP.NET:
http://aspnet.4guysfromrolla.com/articles/022802-1.aspx
Ian
On May 23, 12:50 pm, Alexey Smirnov <alexey.smir@gmail.com> wrote:
> On May 23, 4:53 pm, Adotek <simonmhar
@googlemail.com> wrote:
> > Hi All,
> > I have just enabled output caching on a page, the URL is:
> > Menu2.aspx?user=simon
> > My page/outputcache directives are:
> > <%@ Page Language="vb" AutoEventWireup="false"
> > Codebehind="Menu.aspx.vb" Inherits="OldInfra.Menu" Trace="true"
> > enableviewstate="False"%>
> > <%@ OutputCache Duration="60" VaryByParam="user" %>
> > After enabling outputcache, I did not see any improvement in
> > performance, so I added this to the page:
> > Page Generated: <%=Now()%>
> > ...which always outputs a different time, so I guess this proves it
> > isnt working? Is there anything else I need to do?
> > THanks,
> > Simon.
> Set the Trace attribute to false.- Hide quoted text -
>
Hi All,
Thanks for your replies.
After some Googling, it seems this issue is due to having a
response.flush in our code, which terminates the current requests
thread and flushes the output to the client.