any caching experts please?

S

suzy

hi,

i know that when i browse to a website for the 1st time the code gets
compiled into a dll and is cached. but this dll gets removed from cache
after a period of inactivity, right?

someone told me it is possible to control the length of time the dll is
cached in the web.config file?

is this correct, and can anyone give me an example of how to do it?

thanks.
 
M

mikeb

suzy said:
hi,

i know that when i browse to a website for the 1st time the code gets
compiled into a dll and is cached. but this dll gets removed from cache
after a period of inactivity, right?

someone told me it is possible to control the length of time the dll is
cached in the web.config file?

is this correct, and can anyone give me an example of how to do it?

The ASPX file gets parsed and compiled into a DLL the first time the
page is hit. The DLL is written to a subdirectory under:

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files

That same DLL will be used from there on, until the ASPX file (or some
other file the DLL is dependent on) is modified - there will not be
another parse & compile step unless the page is modified.

However, the DLL for the page will be unloaded from memory when the
application is closed, which can happen for several reasons:

The app needs to get recycled due to some detected problem
The app is shutdown due to being idle for 20 minutes (this is
configurable in web.config's <httpRuntime> element.
Etc.
 
S

suzy

hi mike,

thanks for the reply.

i read the following article:
http://msdn.microsoft.com/library/d...-us/cpgenref/html/gngrfhttpruntimesection.asp

i tried setting the idleTimeOut attribute in the httpRunTime node of the
web.config. I put this within the system.web node but it came up with an
error saying idleTimeOut is an unrecognised attribute.

i thought it might be because the AppDomain wasn't enabled but even if I try
and set an attribute within httpRunTime called enable and set it to "true"
it can't recognise that either.

any idea why?

thanks
 
M

mikeb

suzy said:
hi mike,

thanks for the reply.

i read the following article:
http://msdn.microsoft.com/library/d...-us/cpgenref/html/gngrfhttpruntimesection.asp

i tried setting the idleTimeOut attribute in the httpRunTime node of the
web.config. I put this within the system.web node but it came up with an
error saying idleTimeOut is an unrecognised attribute.

i thought it might be because the AppDomain wasn't enabled but even if I try
and set an attribute within httpRunTime called enable and set it to "true"
it can't recognise that either.

any idea why?

It appears to be a documentation error.

You can try setting the idleTimeout (note that the capitalization is
different) attribute in the <processModel> element - note that this
works only in machine.config, and only on machines that use IIS versions
before 6.0.

If you're running on IIS 6, use the IIS Management tool to set the
idleTimeout.
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top