Cache lifetime

Neal

Forum Admin
Staff member
Joined
Jun 2, 2004
Messages
135
Location
VA
Programming Experience
10+
Okay, this one is almost funny! I am developing an asp.net application on my local system, I press the > to start the debugger and view the app, then close the browser to do more work. I have this code to cache a dataset:

Dim ds As DataSet = Cache("directory")

If Not ds Is Nothing Then

dsDirectory = Cache("directory")

Else

Me.LoadDirectoryDS(di)

Cache("directory") = dsDirectory

End If

It appears the cache object is persisting between debugging sessions. Is this true? I thought if I closed my browser it would kill the cache? What is the cache duration/liftetime then?
 
I would think the cache would reset itself upon a rebuild? Is it possible you're not making any changes prior to debugging, thus, not really rebuilding? That would make sense to me, as the cache is stored on the server...and probably wouldn't release unless there was a rebuild.

Ya?
 
I had to do IISRESET on the local machine to get it to reset each time! Strange! (XP Pro here)
 
I have the cache set with a file dependancy for my situation (one of them) but the other appears that it's going to be the lifetime of the application, hence a restart, worker process timeout, etc.
 
Back
Top