473,796 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why is cache disappearing?

I have an application that I recently converted to 2.0 from 1.1. This
application is relying on data stored at HttpContext.Cur rent.Cache. When I
run in 1.1 the data stays available in the cache, but when I run the 2.0
converted application, once I change pages, the cache is emptied. Is this
just a setting that I am missing, or has something changed about the way that
the cache is managed?
Oct 20 '06 #1
5 1375
Hi,

sounds like there would happen more application restarts which essentially
restart the appdomain ( and clear cache). What do you mean by "once I change
pages"?

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"Harry Keck" <Ha*******@disc ussions.microso ft.comwrote in message
news:01******** *************** ***********@mic rosoft.com...
>I have an application that I recently converted to 2.0 from 1.1. This
application is relying on data stored at HttpContext.Cur rent.Cache. When
I
run in 1.1 the data stays available in the cache, but when I run the 2.0
converted application, once I change pages, the cache is emptied. Is this
just a setting that I am missing, or has something changed about the way
that
the cache is managed?

Oct 20 '06 #2
the cache is a true cache. if memory contraits or dependecy changes occur,
its flushed. so you need to always check if its in the cache first, if not
create the object.

-- bruce (sqlwork.com)

"Harry Keck" <Ha*******@disc ussions.microso ft.comwrote in message
news:01******** *************** ***********@mic rosoft.com...
>I have an application that I recently converted to 2.0 from 1.1. This
application is relying on data stored at HttpContext.Cur rent.Cache. When
I
run in 1.1 the data stays available in the cache, but when I run the 2.0
converted application, once I change pages, the cache is emptied. Is this
just a setting that I am missing, or has something changed about the way
that
the cache is managed?

Oct 20 '06 #3
Whether it is a Server.Redirect to a different page on my site, or simply a
postback to the same page, the Cache is cleared. If I access the cache
multiple times in the same request, it does hold the values throughout that
one request, though.

"Teemu Keiski" wrote:
Hi,

sounds like there would happen more application restarts which essentially
restart the appdomain ( and clear cache). What do you mean by "once I change
pages"?

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"Harry Keck" <Ha*******@disc ussions.microso ft.comwrote in message
news:01******** *************** ***********@mic rosoft.com...
I have an application that I recently converted to 2.0 from 1.1. This
application is relying on data stored at HttpContext.Cur rent.Cache. When
I
run in 1.1 the data stays available in the cache, but when I run the 2.0
converted application, once I change pages, the cache is emptied. Is this
just a setting that I am missing, or has something changed about the way
that
the cache is managed?


Oct 20 '06 #4
Right, I am already doing that, but why is it flushing data that I want to
keep in 2.0, where it did not when this project was 1.1? The only thing that
has changed is that it is now built in Visual Studio 2005 and runs under the
ASP.Net 2.0 framework.

"bruce barker (sqlwork.com)" wrote:
the cache is a true cache. if memory contraits or dependecy changes occur,
its flushed. so you need to always check if its in the cache first, if not
create the object.

-- bruce (sqlwork.com)

"Harry Keck" <Ha*******@disc ussions.microso ft.comwrote in message
news:01******** *************** ***********@mic rosoft.com...
I have an application that I recently converted to 2.0 from 1.1. This
application is relying on data stored at HttpContext.Cur rent.Cache. When
I
run in 1.1 the data stays available in the cache, but when I run the 2.0
converted application, once I change pages, the cache is emptied. Is this
just a setting that I am missing, or has something changed about the way
that
the cache is managed?


Oct 20 '06 #5
OK, I had to reset IIS a couple of times because my development environment
was freezing up, and now the cache is not getting lost. Should I just let
this go, or is it something that I should be concerned with?

"Harry Keck" wrote:
I have an application that I recently converted to 2.0 from 1.1. This
application is relying on data stored at HttpContext.Cur rent.Cache. When I
run in 1.1 the data stays available in the cache, but when I run the 2.0
converted application, once I change pages, the cache is emptied. Is this
just a setting that I am missing, or has something changed about the way that
the cache is managed?
Oct 20 '06 #6

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

Similar topics

9
3336
by: Larry Woods | last post by:
I have a site that works fine for days, then suddenly, I start getting ASP 0115 errors with an indication that session variables IN SEPARATE SESSIONS have disappeared! First, for background information, I have a customized 500-100 page that sends the value of various session variables via email to my support site. The situation: On the home page of the site, the FIRST THING that is done is a Session
1
1900
by: R0bert Neville | last post by:
My web page has one unordered list that disappears in Firefox. The unordered list in question has the class="dir". I double-checked the source code and verified the markup's semantics. Everything looked fine. So I placed the code in the W3C validator and it passed with no errors. Then I placed a regular unordered list with no class before the previous unordered list. Upon a reload, the new unordered list did not render, yet the unordered...
3
2753
by: Paul Reddin | last post by:
Hi, V8.1 fp4a We have been performing some performance measurements on SQL functions and have observed the following and need to verify if this is expected behaviour. Our SQL Functions contain SEVERAL select statements, and it appears that the prep time for statements where the functions are referenced, consume
2
2609
by: Rachel Suddeth | last post by:
Here is my scenario: I have a few custom controls that I set up on a form and tested setting properties and appearances. Then I added a couple references to the project which add classes I need to get data from the server to actually do something useful. (These are generated by 3rd party database software.) After adding those references, and no other changes to my form.... all the controls disappear from the visual interface on the...
4
2758
by: Guadala Harry | last post by:
Is there any way for one Session to remove and update objects in another Session? I seriously doubt it, but thought I'd ask. Here's why: I have some data that is unique per user (or per session - similar to "welcome back, Jim" after Jim logs in) and consumed across multiple pages. This "per user" data lives in a database, so toward improving runtime performance I want to cache data supporting this and similar per user features. Because the...
3
1551
by: Jon | last post by:
I have a couple of tables I want to load into a dataset and keep around pretty much forever, although they will need to be refreshed every so often. I can either put the dataset into an Application("myDataset") var or I can put it into the cache, Cache("myDataset"), both are universally available to my app, except in Global.asax, only Application() vars are available (or it seems that way on my machine, at least). I thought it would be...
3
3174
by: DC Gringo | last post by:
I have an app that I can't seem to clear out server resources with a button onclick event: The session variables seem to be disappearing properly, but the aspnet_wp.exe process stays where it had been upon running a heavy data query. At a normal standstill it's at about 30-40MB and even after the code below runs, it's up at 110MB. What am I doing wrong?
10
4347
by: =?Utf-8?B?TmFkYXYgUG9wcGxld2VsbA==?= | last post by:
Hi Everybody, I'm trying to save some items in the asp.net cache, but they are removed from the cache WAY before they are supposed to (at least as I understand the documentation). I add the object to the cache using this.Context.Cache.Insert(key, userInfo, null, System.Web.Caching.Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(10),
0
3438
by: =?Utf-8?B?Q2hhcmxlcw==?= | last post by:
Like many people, I normally use Yahoo! Mail via the web and like to keep all my emails stored on the Yahoo! server. However sometimes I can’t get access to a PC/the web and I download my emails to a PDA/palmtop via POP3. The PDA uses Windows Mobile software. Since using the PDA, I have had the problem of emails disappearing from the Yahoo! server. However I think I now understand how to avoid this. It seems that Windows Mobile is...
0
10467
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
10244
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
10201
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
9061
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
7558
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
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5454
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
4130
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
3
2931
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.