I have a question about asp.net compiling. I know the different ways you can compile but my question is with the default method. Microsoft says that pages and code are compiled on their first use and then cached. My question is, when does that cache clear... when the app pool recycles? Or, does it cache it until it's changed even through server reboots. Basically, if it compiles once and then caches it until it's changed I'm ok with it... if it recompiles with every reboot or app pool recycle I'm going to go the route of pre-compiling.
+1
A:
The cache is cleared upon app pool shutdown, at each app pool startup it is re-compiled and cached.
Mitchel Sellers
2008-10-06 17:07:06
+1
A:
Whenever you change something to the source files it will recompile.
On startup (after shutdown) it will recompile too.
Changing something to the web.config reboots your web
Tigraine
2008-10-06 17:12:22
One clarification to this, changing the front end ASPX pages (say changing the CSS class on a GridView) will not cause a recompile, only if the code behind file changes will the refresh occur.
Dillie-O
2008-10-06 17:17:33
A:
So the files are created in a temp folder but do not get cleared on shutdown. They will only be recompiled if something changes. So if you restart IIS or reboot the machine, they will not recompile. Just reload them from the temp folder.
Changes to any of the files of the project, or any files the project is dependant on will cause a recompile.
Tom
2008-10-06 17:30:46