Welcome Guest Search | Active Topics | Members | Log In | Register

Interesting OutputCache expiration problem Options · View
yashgt@gmail.com
Posted: Saturday, October 06, 2007 2:58:35 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 06/10/2007 02:58:35
Date: Sat, 06 Oct 2007 09:58:35 -0700

Hi,

I have a user control MyControl.ascx which appears on various pages in
my ASP .NET 2.0 application. I have setup partial-page caching using
OutputCache directive so that this control gets cached on each page.
However, there is one page Update.aspx which contains the control and
has features that update the DB entries that determine the output of
the control.

I have set SqlDependency so that the control's cache is expired when
the table is updated. But on this page, if I update the DB, the cache
does not expire immediately, and hence when the page is returned back
to the user the control still shows the older values. The cache is not
expired immediately because the SqlDependency is only periodically
refreshed to check if there is a change. Since the DB is updated on
postback in an event handler, the postbacked page is returned with the
older cached control.

Is there a way to expire the control's cache immediately so that the
control on this page renders with the updated values?

Thanks,
Yash

Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.1 (NET v2.0) - 9/10/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.039 seconds.