November Happy Hour will be moved to Thursday December 5th.

How do I enable VPP static file caching?

Vote:
 

Hi all,

I am trying to get IIS Output caching (kernel caching) working for our EPiServer 7 site and am not having a lot of success. 

In our web.config file we have OutputCaching configured like so:

<caching>
      <profiles>
        <add extension=".gif" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
        <add extension=".png" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
        <add extension=".js" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
        <add extension=".css" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="00:01:00" location="Any" />
        <add extension=".jpg" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
        <add extension=".jpeg" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="00:01:00" location="Any" />
      </profiles>
    </caching>

    

To test that Output Caching for static files is working I have been watching the following counters in perfmon while requesting a jpg image that is stored in the VPP:

\W3SVC_W3WP(_Total)\Output Cache Current Items
\W3SVC_W3WP(_Total)\Output Cache Current Hits /sec

Requesting the image multiple times in quick succession doesn't increment the Output Cache Current Items as expected.

Interestingly, if I change the jpg output cache configuration to use user mode caching the perfmon counters to increment as expected.

        <add extension=".jpg" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="00:01:00" location="Any" />

    

I've read about using the staticFile section (http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-Framework/7/Configuration/Configuring-staticFile-Section/) but I can't seem to get that to work and am not actually sure if that's even relevant. The documentation isn't particularly clear.

Any advice anyone can provide would be much appreciated.

Cheers,

James

#77772
Nov 26, 2013 9:41
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.