2013-04-12 23 views
0

我启用了PHP文件输出缓存输出缓存并不WordPress的PHP文件工作

<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> 

缓存对于PHP测试文件,打印时间

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

,但它不't for wordpress(日期打印在第3行的页面上)

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

我没有在wordpress中使用任何插件。

回答

0

我对第二个链接为什么没有被缓存的猜测是链接没有结束php

如果您使用*扩展名,您可能会有更好的运气。但是,这可能会缓存一些您不打算缓存的内容。

另一种选择是使用Wordpress插件,如W3 Total Cache。虽然我没有亲自使用它。

另请参阅:Speed Up Wordpress On IIS 7

+0

带*号不能正常工作。我甚至尝试过Wordpress PermaLink格式的“index.php?id = 4002”,并没有工作 – Reza