I am having an issue where output caching doesn't appear to be working for my ASP.NET MVC 4 (EPiServer 7) website.
I have the following output cache profile in my web.config
:
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="PageOutput" enabled="true" duration="300" varyByParam="*" location="ServerAndClient" />
</outputCacheProfiles>
</outputCacheSettings>
</caching>
And here is my output caching configuration for static resources:
<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>
And my controller is decorated with an output cache attribute like so:
[OutputCache(CacheProfile = "PageOutput")]
public class HomePageController : BasePageController<HomePage>
{ ...}
I'm watching the following counters in perfmon but not seeing them increment as expected when I visit the home page:
\ASP.NET Apps v4.0.30319(__Total__)\Output Cache Entries
\ASP.NET Apps v4.0.30319(__Total__)\Output Cache Hits
I've also been testing using tinyget
like so:
tinyget -srv:mywebsite -uri:/ -threads:1 -loop:20
Any advice would be greatly appreciated!