【发布时间】:2011-12-12 14:52:29
【问题描述】:
我们想为单个 .aspx 文件使用IIS 7.5 output caching,但在 iis.net 上阅读后,在我看来缓存只能配置为各种文件扩展名,而不是单个文件。这是正确的还是我错过了什么?
谢谢。
【问题讨论】:
标签: iis outputcache
我们想为单个 .aspx 文件使用IIS 7.5 output caching,但在 iis.net 上阅读后,在我看来缓存只能配置为各种文件扩展名,而不是单个文件。这是正确的还是我错过了什么?
谢谢。
【问题讨论】:
标签: iis outputcache
只需将视图更改为“内容”选择文件,然后对其进行配置。在扩展中添加 eq .js 或 .php。此配置将仅适用于此文件。
您可以在此查看:
当量
web.config
<location path="cachedfile.php">
<system.webServer>
<caching>
<profiles>
<add extension=".php" policy="CacheForTimePeriod" kernelCachePolicy="CacheUntilChange" duration="00:30:00" />
</profiles>
</caching>
</system.webServer>
</location>
【讨论】: