У меня проблема с настройками выходного кэша в файле web.config. Я использую Nginx 0.8.53 с Fast CGI, на openSuse 11.3asp.net apache2/nginx Проблема OutputCache
Для динамических страниц я создал OutputCacheProfiles, которые отлично работают в среде визуальной студии в окнах. Когда я запрашиваю страницу, у нее есть правильный заголовок управления кешем. Но когда я работаю с Nginx на openSuse, он продолжает отправлять «Cache-Control public, max-age = 0» независимо от того, что я установил в OutputCacheProfiles. Я попробовал apache2, он также не отвечает на настройки outputcacheprofile, как в nginx.
Все работает отлично в среде Windows, я получаю правильные заголовки управления кешем для разных страниц в разных браузерах. Но когда я использую apache или nginx, похоже, я не отвечаю на мои файлы outputcacheprofiles в файле web.config. Я удалил директиву с ее содержанием, он все же добавляет, что 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>