views:

27

answers:

2

I made a simple testcase.

default.asp:

<%=now%>

web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<location path="default.asp">
    <system.webServer>
        <caching>
            <profiles>
                <add extension=".asp" policy="CacheForTimePeriod" kernelCachePolicy="DontCache" duration="01:00:00" varyByQueryString="*" />
            </profiles>
        </caching>
    </system.webServer>
</location>

If i request default.asp 2 times the page's get cached en the datetime value says the same for a period of time but not for the whole hour.

To test this open default.asp request the page until it is cached then wait for 5 minutes and refresh the page.

I am using Windows 7 + IIS7.5

A: 

Hi there,
Can you clarify what the lifetime of the application is in IIS. Could IIS be culling the application due to non use?
One way to test this out would be to keep refreshing the page every 20 seconds. If the cached page keeps the original time for longer than the 5 minutes you mentioned then this would point to the fact that the application is being culled. When you then request this app again it generates the cached version afresh.

Jonathan Stanton
I checked the w3wp.exe process and it doesn't gets culled the idletimeOut is 20 minutes.I have the idea that it has something to do with the page not getting requested anymore and therefore it gets invalidates from the cache?
K.Rijpstra
A: 

I did a failed request tracing and found the following.

If the page doesn't get frequently hit the cache invalidates even thought the duration isn't reached: http://img819.imageshack.us/img819/7963/45303467.png

K.Rijpstra

related questions