|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
IIS ASP Page Caching
Hi All,
I have an application that uses a single index.asp file that then uses server-side includes to include all of the sub-page content from other ASP pages. So basically every page that can be visited is included via the single index.asp file with the page to view specified in the index.asp query string. My question is whether or not this is good or bad from a performance standpoint. I understand that when this index.asp is first compiled, it is compiled as one HUGE ASP file because of all of the files that are included with in it. This is time consuming, but on the other hand, since IIS caches pages and this looks like a single page, does that mean that my entire application gets cached and the performance improves because there aren't multiple pages being cached in and out?? Are the IIS settings that I should change to boost performance with my situation? Thanks in advance! Larry |
|
#2
|
|||
|
|||
|
This is pretty unfriendly to the server. Back in IIS4 I think cached pages weren't shared between users, so if you had 10 visitors you'd have 10 copies of the code in cache.
I'd try to just put the code I need in an asp page.
__________________
====== Doug G ====== "Hide, hide witch! The good folk come to burn thee. Their keen enjoyment hid behind their gothic mask of duty." -Mark Clifton |
|
#3
|
|||
|
|||
|
OUCH! If that's true, that is bad! But, my understanding is that the ASP 'source' is cached and the source will be shared by all users, so IIS will not need to recompile that source. Isn't this a very common way to use server side includes? Instead of frames, I have a table where the main 'window' of the page is being filled with the code that executes from the appropriate ASP file that is specified in a query string like "index.asp?page=hello.asp".
<tr> <td> <% page = request.querystring("page") if page="hello.asp" then <!-- #include file="hello.asp" --> elseif page="goodbye.asp" then . . end if %> </td> </tr> Doesn't this ASP source get compiled and cached and servered to each user? The compiled source will be big, but it can be delivered to each user without reloading or recompiling, won't it? |
|
#4
|
|||
|
|||
|
Your code sample won't work the way you expect. The include file code will be present in the page, the if statement will conditionally execute the code but won't conditionally include the code. Includes are processed before the code for the page is passed to the asp interpreter.
Take a look at server.execute and server.transfer, perhaps they would fit better in your scheme of things. Oh, I don't know if IIS6 changed anything in this area. |
|
#5
|
|||
|
|||
|
Actually, this code WILL work and does. My site implements this currently. I already understand that the code will not be conditionally included. That is the reason for my original question. Since ALL of the code is include, I presume it is ALL cached with the main index.asp page. My question was asking whether or not this could actually be a performance improvement since basically the entire application gets cached as one big page.
|
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > IIS ASP Page Caching |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|