Groups | Blog | Home
all groups > asp.net caching > october 2004 >

asp.net caching : Cache file dependency stops working


Ian Cox
10/21/2004 2:30:45 PM
Hello. I hope someone can help us.
We have an ASP.NET application that uses caching, which has given us
dramatic performance benefits..
We use file dependency expiry and sql triggers to create a file, so that we
can expire the cache when database updates are made.
It had been working fine until relatively recently when we noticed that
sometimes the cache was not being cleared as expected. The files are still
being created successfully and the name of the file matches the name of the
cache dependency.
It seems that after an amount of time (or maybe an amount of cached items)
the depency link is severed somehow.
If we reset the web app and thus flush everything, it works ok for a short
while and then stops working again.
We have a page that we use to manually clear items from cache, or indeed
clear everything from cache. This basically creates the files behind the
scenes and puts them in the cache dependency folder.
Using this to test with, I can see that it is working normally straight
after a web app reset. If I click the button everything is cleared from
cache. Sometime afterward (1hr-ish?) if I click the button items are not
cleared from cache.

Has anyone noticed anything like this before? All suggestions greatly
appreciated.

Cheers
Ian

Alvin Bruney [MVP]
10/21/2004 5:18:40 PM
Reset your cache dependency to fire every 5 minutes or so and write a log
somewhere. The idea is to find out when the dependency goes away. Then you
can see if this is a setting in your config file somewhere that somebody has
set.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
[quoted text, click to view]

Ian Cox
10/22/2004 2:21:12 PM
That's a good idea.
Unfortunately for us, we have had to disable the cache entirely now as it
was causing too many problems (putting the on/off switch in a config file
was one of our better moves).
Until we can recreate the issue in an evironment other than production (not
able to so far) then we are shooting in the dark...


[quoted text, click to view]

AddThis Social Bookmark Button