PC Review


Reply
Thread Tools Rate Thread

Bizarre: OutputCache or user control not working

 
 
yashgt@gmail.com
Guest
Posts: n/a
 
      2nd Oct 2007
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
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OutputCache with Page not working propely Sudhir Sharma Microsoft ASP .NET 1 27th Mar 2005 04:12 AM
OutputCache with Page not working propely Sudhir Sharma Microsoft C# .NET 1 25th Mar 2005 10:46 PM
Problems with OutputCache declaration in User Control =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= Microsoft ASP .NET 1 20th Oct 2004 04:09 PM
outputcache - clientside caching not working? Dave Bartlett Microsoft ASP .NET 1 26th May 2004 12:06 PM
User Control, @OutputCache, and varying the cache by property value Tom Kiefer Microsoft ASP .NET 6 10th Feb 2004 04:18 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:02 AM.