ASP.NET Application Lifetime & Cache Expiration

S

Sashko

Hi,

I made an ASP.NET (.NET 1.1) application that uses the Context.Cache
object within Global.asax as a static member. It is set up in such a
way that whenever the cache items expire, they recache themselves
automatically.

However, I ran into a problem. It seems like my application ends
prematurely (or is recycled or something), usually after the last
session is done, and I lose all my Cache saved objects. Next time the
page is viewed, all the data has to be reloaded as Application_Start is
called.

Is there a configuration setting that I can tweak that will tell IIS or
ASP.NET to keep my application alive and persist the Application Cache?

Thanks!

~Alex
 
J

Joerg Jooss

Thus wrote Sashko,
Hi,

I made an ASP.NET (.NET 1.1) application that uses the Context.Cache
object within Global.asax as a static member. It is set up in such a
way that whenever the cache items expire, they recache themselves
automatically.

However, I ran into a problem. It seems like my application ends
prematurely (or is recycled or something), usually after the last
session is done, and I lose all my Cache saved objects. Next time the
page is viewed, all the data has to be reloaded as Application_Start
is called.

Is there a configuration setting that I can tweak that will tell IIS
or ASP.NET to keep my application alive and persist the Application
Cache?

System.Web.Caching.Cache works in memory, but Enterprise Library 2.0 offers
a durable cache class with a similar API.

Cheers,
 

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

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,085
Latest member
cryptooseoagencies

Latest Threads

Top