【发布时间】:2011-05-16 03:34:07
【问题描述】:
我对 web.config 文件中的输出缓存设置有疑问。 我在 openSuse 11.3 上使用 Nginx 0.8.53 和 Fast CGI
对于动态页面,我创建了 OutputCacheProfiles,它们在 windows 中的 Visual Studio 环境中完美运行。当我请求一个页面时,它带有正确的缓存控制标头。但是当我在 openSuse 上使用 Nginx 时,无论我在 OutputCacheProfiles 中设置什么,它都会不断发送“Cache-Control public,max-age=0”。我试过apache2,它似乎也没有像nginx一样响应outputcacheprofile设置。
一切都在 Windows 环境下完美运行,我为不同浏览器中的不同页面获得了正确的缓存控制标头。但是当我使用 apache 或 nginx 时,它似乎没有响应我在 web.config 文件中的 outputcacheprofiles。 我删除了指令及其内容,它仍然在响应中添加了 max-age=0。 希望我解释了情况。 最好的问候。
<caching>
<outputCache enableOutputCache="true" />
<outputCacheSettings>
<outputCacheProfiles>
<add name="MatchesController.Index" duration="5" varyByParam="*" varyByCustom="utcOffset" location="ServerAndClient" enabled="true" noStore="true"/>
<add name="MatchesFeedController.Index" duration="5" varyByParam="*" varyByCustom="utcOffset" location="ServerAndClient" enabled="true" noStore="true"/>
<add name="MatchesFeedController.IncidentsSummary" duration="5" varyByParam="*" location="ServerAndClient" enabled="true"/>
<add name="MatchesController.Show" duration="60" varyByParam="*" varyByCustom="utcOffset" location="ServerAndClient" enabled="true"/>
<add name="MatchesController.Preview" duration="60" varyByParam="*" varyByCustom="utcOffset" location="ServerAndClient" enabled="true"/>
<add name="MatchesController.Live" duration="60" varyByParam="*" varyByCustom="utcOffset" location="ServerAndClient" enabled="true"/>
<add name="MatchesController.TeamStats" duration="60" varyByParam="*" varyByCustom="utcOffset" location="ServerAndClient" enabled="true"/>
</outputCacheProfiles>
</outputCacheSettings>
</caching>
【问题讨论】:
标签: asp.net linux mono nginx outputcache