HighTechTalks DotNet Forums  

Interesting OutputCache expiration problem

ASP.net Caching microsoft.public.dotnet.framework.aspnet.caching


Discuss Interesting OutputCache expiration problem in the ASP.net Caching forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
yashgt@gmail.com
 
Posts: n/a

Default Interesting OutputCache expiration problem - 10-06-2007 , 11:58 AM






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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.