473,657 Members | 2,449 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_Sta rt 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 1787
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_Sta rt
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.Cach ing.Cache works in memory, but Enterprise Library 2.0 offers
a durable cache class with a similar API.

Cheers,
--
Joerg Jooss
ne********@joer gjooss.de
Jun 22 '06 #2

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

Similar topics

3
1529
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 second, so needs to be loaded at least at that rate. at the moment, the ASP application loads the xml every refresh - im thinking that this may cause problems when there are 20 clients each refreshing once per second. the solution im thinking of...
2
3317
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 computer (pc still running), then leave office. Second day I come to the office and unlock computer, the cache still doesn't expire! (It already exceed 60min). And I use the cache, and it still working. And after awhile, the cache start flushing. So I am...
7
2162
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 got is a decodeImage.aspx page that gets called to decode base64 encoded images and return them as displayable images to a Web page. The ASPX page is passed two parameters, "file" and "img". The "file" parameter specifies and XML file on the Web...
1
2855
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 it needs to remove the object to free up memory. (If my understanding so far is wrong, please clarify) What I'd like to know is that if I place an object into the Cache with a sliding expiration - is it possible/likely that the system will...
2
1981
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 exception saying that ViewState was invalid. I suspect it has something to do with cache expiration time. Can I control its expiration time from within my web.config? Or anyhow? Couldn't find anything related in web or machine config files or...
6
1753
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: 1) When is memory used for Session State freed (or essentially freed)? - if ever...
4
2991
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 Cache.Insert("DataListStartEndDates",DateRangesForDataLists,null,AbsoluteExpirationDate,TimeSpan.Zero);
5
2274
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 someone explain what I might be doing wrong or what to look out for? What's the differece between IIS and VS web server? The IIS servers seem to have enough memory. public DataTable GetAll() {
4
4944
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, theoretically, forever? I do understand that the system can purge items from the Cache at any time, and that I have options to set absolute and sliding expirations as well as cache item priority. But what happens if I explicitly set NONE of those
0
8826
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7330
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6166
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4155
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
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 we have to send another system
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.