HighTechTalks DotNet Forums  

Bizarre: OutputCache or user control not working

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


Discuss Bizarre: OutputCache or user control not working in the ASP.net Caching forum.



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

Default Bizarre: OutputCache or user control not working - 10-02-2007 , 06:32 AM






We use ASP .NET 2.0.50727 with SQL Server 2005 Developer edition and
IIS 5.1
I am trying to apply OutputCaching only for a user control and nothing
else.
In a user control when I have
<%@ OutputCache Duration="600" VaryByParam="None" %>
The caching works as I expected till I change a value in a DB table
used by the control. I have not set any dependency on the table for
this cache. I have however, enabled dependency tracking for the table
using aspnet_regsql. But the depedency is not linked to the control
yet.
I expect the output of the control to remain unchanged for 10 min
regardless of the values in the table. If the table is not updated,
the older values keep showing without the DB being queried. That is
cool. What I notice is that even before 10 min elapse, if I update the
table, the cache gets invaidated and a query goes to the DB to fetch
the new content. I have seen the query in the query profiler as well
as through debugging. What is worse, is that this continues
thereafter. Even without changing any value in the table, the cache
remains perennially invalid and the control keeps querying the DB on
every page refresh.

I have run this entire test after resetting IIS just to be sure that
some previous coniguration is not invalidating the cache.
All the HttpModules, etc. are untouched.
What am I missing here?

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.