473,473 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Create 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.Current.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 1360
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*******@discussions.microsoft.comwrote in message
news:01**********************************@microsof t.com...
>I have an application that I recently converted to 2.0 from 1.1. This
application is relying on data stored at HttpContext.Current.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*******@discussions.microsoft.comwrote in message
news:01**********************************@microsof t.com...
>I have an application that I recently converted to 2.0 from 1.1. This
application is relying on data stored at HttpContext.Current.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*******@discussions.microsoft.comwrote in message
news:01**********************************@microsof t.com...
I have an application that I recently converted to 2.0 from 1.1. This
application is relying on data stored at HttpContext.Current.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*******@discussions.microsoft.comwrote in message
news:01**********************************@microsof t.com...
I have an application that I recently converted to 2.0 from 1.1. This
application is relying on data stored at HttpContext.Current.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.Current.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
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...
1
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...
3
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...
2
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...
4
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 -...
3
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...
3
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...
10
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...
0
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...
0
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
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
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...
1
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...
0
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
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...
0
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
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
muto222
php
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.