Output caching in IIS doesn’t work for WordPress php files

I enabled output caching for php files

<configuration>
   <system.webServer>
      <serverRuntime frequentHitThreshold="1" frequentHitTimePeriod="00:00:30" />
      <caching>
         <profiles>
           <add extension="*.php" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="00:00:59" location="Any" varyByQueryString="*" />
         </profiles>
      </caching>
   </system.webServer>
</configuration>

Caching works for PHP test file which prints time

Read More

http://www.ahangbaz.com/time.php

but it doesn’t work for wordpress (date is printed on page on 3rd line)

http://www.ahangbaz.com/index.php/4002/omega-el-producto/

I am not using any plugin in wordpress.

Related posts

Leave a Reply

1 comment

  1. My guess as to why the second link is not cached is that the link does not end in php.

    You might have better luck if you use a * extension. However, that might cache some things that you do not intend to cache.

    Another alternative is to use a WordPress plugin, such as W3 Total Cache. I have not personally used it though.

    See also: Speed Up WordPress On IIS 7