2010-11-26 10 views
2

web.configファイルのoutputcache設定に関する問題があります。 openSUSE 11.3でNginx 0.8.53とFast CGIを使用しています。asp.net apache2/nginx OutputCacheの問題

ダイナミックなページでは、ウィンドウ内のビジュアルスタジオ環境で完璧に動作するOutputCacheProfilesを作成しました。私がページを要求するとき、正しいキャッシュ制御ヘッダーが付属しています。 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> 

答えて

0

nginx/apacheの問題よりもモノのバグのような感じです。 monoを使用する場合は、nginxまたはapacheを使用せずにmonoを同梱するxsp Webサーバーを使用してアプリケーションをホストし、Cache-Controlヘッダーの結果を確認してください。間違ってnginx/apacheがなくてもpublic, max-age=0に設定されていると、これはモノのバグかもしれません。