idonix
3/3/2006 10:21:00 AM
Hi Yuan,
I have moved the code to BeginRequest, as you suggest, but unfortunately
this makes no difference. ASP.NET doesn't reliably call GetVaryByCustomString
unless I add the OutputCache directive to the aspx files.
It's a development environment - XP Pro SP2, with 1GB RAM.
Pete
""Yuan Ren[MSFT]"" wrote:
> Hi Pete,
>
> Thanks for posting!
>
> For the current issue, the problem is that cache doesn't work sometimes in
> the current ASP.NET application. If I have misunderstood anything, please
> let me know.
>
> As far as I know, using the "OutputCache" is same as setting these things
> programmatically. Then, I think the current resolution isn't appropriate.
> This means maybe the problem still occurs sometimes.
>
> I wonder when the problem is encountered, whether the usage of memory is
> high or something else. Could you please give me some more details about
> the environment?
>
> By the way, I suggest you can move the code from the Page_Load event to the
> Application_BeginRequest event in the Global.asax file. Something likes
> below:
> protected void Application_BeginRequest(Object sender, EventArgs e)
> {
> Context.Response.Cache.SetCacheability( HttpCacheability.Server);
> Context.Response.Cache.VaryByParams.IgnoreParams = true;
> Context.Response.Cache.SetExpires(DateTime.Now.AddSeconds(count));
> ...
> }
>
> Thanks for your understanding. I'm looking forward your reply!
>
> Yuan Ren [MSFT]
> Microsoft Online Support
> ======================================================
> PLEASE NOTE the newsgroup SECURE CODE and PASSWORD were
> updated on February 14, 2006. Please complete a re-registration process
> by entering the secure code mmpng06 when prompted. Once you have
> entered the secure code mmpng06, you will be able to update your profile
> and access the partner newsgroups.
> ======================================================
> When responding to posts, please "Reply to Group" via your newsreader
> so that others may learn and benefit from this issue.
> ======================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
> ======================================================
>
>