【问题标题】:Is it possible to configure IIS 7.5 output caching for an individual page?是否可以为单个页面配置 IIS 7.5 输出缓存?
【发布时间】:2011-12-12 14:52:29
【问题描述】:

我们想为单个 .aspx 文件使用IIS 7.5 output caching,但在 iis.net 上阅读后,在我看来缓存只能配置为各种文件扩展名,而不是单个文件。这是正确的还是我错过了什么?

谢谢。

【问题讨论】:

    标签: iis outputcache


    【解决方案1】:

    只需将视图更改为“内容”选择文件,然后对其进行配置。在扩展中添加 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>
    

    【讨论】:

      猜你喜欢
      • 2018-05-13
      • 2011-07-08
      • 2015-12-22
      • 1970-01-01
      • 2012-06-04
      • 2011-04-09
      • 2018-09-01
      • 2011-05-04
      • 2014-04-01
      相关资源
      最近更新 更多