[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.caching

Bizarre: OutputCache or user control not working

Yash Ganthe

10/2/2007 11:32:00 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