Home All Groups Group Topic Archive Search About

OutputCache with Page not working propely

Author
25 Mar 2005 5:36 PM
Sudhir Sharma
guys,
I have this code in my .aspx file.
<%@ OutputCache Duration="500" VaryByCustom="OrganizationID" VaryByParam="None"
%>

and I have overriden the method "GetVaryByCustonString()" in my global.asax.cs
file. whenever the organization is changed for the Page, it should invalidate
the Cache and show the new information based on the organization. it is not
doing that.
I put the breakpoints in the code.It is hitting the "GetVaryByCustomString()"
only for the first 2 times. after that it is not going to it. and it is showing
the Cached page again and again.
Is there any way to Invalidate the Page Output before the Desired time (
in this case it is 500 secs).
any help is appreciated.
Thanks
Sudhir Sharma

Author
25 Mar 2005 10:46 PM
Alvin Bruney [ASP.NET MVP]
one thing to check is to make sure the contained page is not overriding the
settings. is it? You obviously have another with the breakpoint only firing
twice. you need to find out what is causing this first.

--
Regards,
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
_________________________


Show quote
"Sudhir Sharma" <ssha***@avidxchange.com> wrote in message
news:16220632473509618142376@news.microsoft.com...
> guys,
> I have this code in my .aspx file.
> <%@ OutputCache Duration="500" VaryByCustom="OrganizationID"
> VaryByParam="None" %>
>
> and I have overriden the method "GetVaryByCustonString()" in my
> global.asax.cs file. whenever the organization is changed for the Page, it
> should invalidate the Cache and show the new information based on the
> organization. it is not doing that.
> I put the breakpoints in the code.It is hitting the
> "GetVaryByCustomString()" only for the first 2 times. after that it is not
> going to it. and it is showing the Cached page again and again.
> Is there any way to Invalidate the Page Output before the Desired time (
> in this case it is 500 secs).
> any help is appreciated.
> Thanks
> Sudhir Sharma
>
>
>

AddThis Social Bookmark Button