Worker process and Cache object's lifetime

G

Guest

Hello All,

I have been caching an object in a web app and I am running the web app on
my localhost i.e., local machine which has its own IIS web server. Now my
question is if I access web application from my localhost where would that
cached object live? Is it in web server's memory OR inside the worker process?

I am assuming that the cache objects are stored in web server's memory. But
interestingly everytime I close my browser (only instance accessing web
application from the http://localhost), the cache object is being killed and
is created fresh for browser instances which access localhost thereafter. And
this makes me think that cache objects are stored in worker process and not
in web server's memory because I am assuming that worker process gets killed.
Am I right?

And finally when does a worker process start and when does that process get
killed. Is it started only when a browser makes request to a page in the web
app for the very first time? And gets killed if there are no browser
instances accessing? Or is this worker process a persistent process inside
the ASP.NET engine which is yet another process running forever inside the
web server?

I hope that I expressed my questions unambiguously and if I missed something
or if I am not clear please reply me as to where I need to be clear.

Thanks!!
 
G

Guest

Diffident,
The Cache lives in the AppDomain which is created when the application is
first requested, unless you are using some sort of custom cache. The
application may persist even if no requests are being made for a period. If
you change the web.config, the Application recycles and a new Cache is
created (without your items of course).
Peter
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top