473,503 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET Application Lifetime & Cache Expiration

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

Jun 21 '06 #1
1 1777
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,
--
Joerg Jooss
ne********@joergjooss.de
Jun 22 '06 #2

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

Similar topics

3
1525
by: spammy | last post by:
hi all, im currently writing an ASP.net front end to display data found in an XML file. the XML file is quite large (700k or so), and so takes a while to load. it will be changing around every...
2
3304
by: Dicky Cheng | last post by:
Hi, I am using absolute expiration to expire my cache object in Cache API. And I set it to expire after 60min. Then I test it, it cache, and everything fine. Then I stop working and lock...
7
2150
by: Greg Collins [MVP] | last post by:
Hi, I couldn't find what I was looking for by searching the newsgroup, but perhaps these have already been discussed somewhere. This is a bit long with a lot of interrelated questions. What I've...
1
2841
by: Guadala Harry | last post by:
AFAIK, when placing an object into the Cache with no special instructions (no dependencies, sliding expirations, hard expirations, etc), it will just sit there in the Cache until the system decides...
2
1970
by: Kikoz | last post by:
Hi all. I keep my ViewState in server's cache. Works fine except when user leaves the page opened for a long time (2 hours or so). Then if he/she tries to post it back the server throws an...
6
1739
by: spacehopper_man | last post by:
I'm considering ditching all use of Session state in favour of Application state. This is because - from what I can work out - it will be more memory efficient for me. I have three questions:...
4
2975
by: Diffident | last post by:
Hello All, I inserted an object into cache with absolute expiration using the following code: DateTime AbsoluteExpirationDate = DateRangesForDataLists.AddDays(1); //Expires the next day...
5
2266
by: J055 | last post by:
Hi The following code works on my develeopment machine using the VS web server. When I run the application on 2 other Windows 2003/IIS 6 servers no caching seems to take place at all. Can...
4
4939
by: Jordan S. | last post by:
Using .NET 3.5... When I add an item to the system Cache, like this: HttpRuntime.Cache = "Some string"; For how long will it remain in the Cache by default. Could it remain there,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7348
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5592
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5021
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1519
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.