Why is cache disappearing?

G

Guest

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?
 
T

Teemu Keiski

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"?
 
B

bruce barker \(sqlwork.com\)

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)
 
G

Guest

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.
 
G

Guest

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.
 
G

Guest

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?
 

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

Top