cache never expires

F

fnustle

Asp.net cache expiration isn't working on the host that I've just moved
to. The cache just doesn't expire. It's not the code because it works
fine on my localhost and at my previous hosting provider.

HttpRuntime.Cache.Insert(XmlCacheKey,ds,null,Cache.NoAbsoluteExpiration,
TimeSpan.FromMinutes(1),CacheItemPriority.Normal,saveData)

I'm using it as a write-back cache that saves the in-memory dataset to
disk every minute if dirty and also on session end, so it's critical
that the cache expires.

I asked my hosting provider if they have disabled expiration using
<cache disableExpiration="false"/> and they said no.

Is there any other reason anyone can think of why the cache won't
expire?
 
M

Mark Fitzpatrick

How often is this item being accessed? If it's being accessed at least once
a minute then it won't expire from the cache. I'm just wondering if there is
something that could be scanning a file that makes use of this cached item,
causing it not to drop out of the cache.
 
F

fnustle

Thank you for your reply.

It can't be that because it doesn't expire even when I stop the
application. (normally all cache is expired when application ends)
 
F

fnustle

I've further narrowed the problem. What is actually happening is the
cache IS expiring but the callback method saveData is not being
called. Again this works fine in the development environment but not
in the hosting environment.
 
F

fnustle

An additional piece of info is that the host environment is win2k3 and
my dev environment is win2k.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top