473,324 Members | 2,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Partial-page cache getting repeatedly invalidated

Hi,

We have a control Logo.ascx, which queries the DB to obtain the logo
image from a blob in the DB and renders it on the page.
The logo does not change frequently and hence we have tried to create
a cache for it:
<%@ OutputCache Duration="600" VaryByParam="None"
SqlDependency="EMAMDB:EMAM_Clients" %>
The cache will thus be invalidated every 10 min and also depending on
the changes to the EMAM_Clients table which has only one entry.

The dependency is set as follows:
<caching>
<sqlCacheDependency enabled="true" pollTime="1000">
<databases>
<add name="EMAMDB" connectionStringName="EMAMConnectionString"/>
</databases>
</sqlCacheDependency>
</caching>
The polling thus happens every second.

So we expect that if we refresh the page repeatedly once, the DB
stored proc that retrieves the logo should not be called each time.
However this is not the observed case. Almost every alternate refresh
causes the DB to be queried. We have also traced the code to verify
this. We have seen the
dbo.AspNet_SqlCachePollingStoredProcedure being called every second,
which means the Changes do get tracked, and we know for sure that
nobody is changing the table.

Why then is the cache invalidated every now and then?

Thanks,
Yash

Sep 30 '07 #1
1 1694
Just realized that this problem occurs only on the in-built web server
in VS 2005. The application behaves as expected when run in IIS.

-Yash


zedOn Sep 30, 6:43 pm, yas...@gmail.com wrote:
Hi,

We have a control Logo.ascx, which queries the DB to obtain the logo
image from a blob in the DB and renders it on the page.
The logo does not change frequently and hence we have tried to create
a cache for it:
<%@ OutputCache Duration="600" VaryByParam="None"
SqlDependency="EMAMDB:EMAM_Clients" %>
The cache will thus be invalidated every 10 min and also depending on
the changes to the EMAM_Clients table which has only one entry.

The dependency is set as follows:
<caching>
<sqlCacheDependency enabled="true" pollTime="1000">
<databases>
<add name="EMAMDB" connectionStringName="EMAMConnectionString"/>
</databases>
</sqlCacheDependency>
</caching>
The polling thus happens every second.

So we expect that if we refresh the page repeatedly once, the DB
stored proc that retrieves the logo should not be called each time.
However this is not the observed case. Almost every alternate refresh
causes the DB to be queried. We have also traced the code to verify
this. We have seen the
dbo.AspNet_SqlCachePollingStoredProcedure being called every second,
which means the Changes do get tracked, and we know for sure that
nobody is changing the table.

Why then is the cache invalidated every now and then?

Thanks,
Yash

Oct 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Lionel B | last post by:
Greetings. The following code compiles ok and does what I'd expect it to do: ---------- START CODE ---------- // test.cpp
9
by: Gomaw Beoyr | last post by:
Two question about the "partial classes" (in the next wersion of ..NET). Question 1 ========== Will partial classes (in the next version of C#) have to be declared "partial" in ALL places. ...
16
by: Madhuri Mittal | last post by:
Hi, I know that we can define a class over multiple source files using the keyword 'Partial' in C# within a project. Can we define the class over multiple projects using the 'Patial' keyword- I...
6
by: Ronald Mai | last post by:
In my opinion, Ellipsis might be in the middle, not only in leftmost or rightmost, so a placeholder approach can be much more flexible and convenient. Here is a reference implementation: _ =...
2
by: Billy | last post by:
In .Net 2, when I have created a strongly typed dataset of a SQL table and then 'viewed' the code from the RHM menu. I am taken to the new partial class; as expected, but why do I have a partial...
1
by: Bishoy George | last post by:
In a web application using asp.net 2.0 All my classes are partial classes. - I noticed that partial class cannot be inherited... is that true? - I tried to remove the partial keyword , and I...
3
by: erich | last post by:
In VS2005, creating a new form creates the form class and a partial (frm*.designer.vb) class file and displays the partial class beneath the main form frm*.vb, which is great. However, when...
1
by: chungiemo | last post by:
Hi thought I would do another thread as this one is a bit different from the previous problem I am looking for a solution to the relating problem Comparing 2 access databases with 2 tables,...
2
by: Peted | last post by:
Hi, im moving a project from vs2005 to vs 2008. is doing so i have come across a compiler error regarding partial classes that i dont understand if anyone can explain it to me please the...
10
by: JDeats | last post by:
So I have a class that spans over two partial classes in code, here's an example (do not read much into this, the code is of no practical use, this is just a simple example of where my confusion...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.