次の方法で共有


SystemWebCachingSectionGroup.OutputCacheSettings プロパティ

定義

構成に格納されている outputCacheSettings セクションを取得します。

public:
 property System::Web::Configuration::OutputCacheSettingsSection ^ OutputCacheSettings { System::Web::Configuration::OutputCacheSettingsSection ^ get(); };
[System.Configuration.ConfigurationProperty("outputCacheSettings")]
public System.Web.Configuration.OutputCacheSettingsSection OutputCacheSettings { get; }
[<System.Configuration.ConfigurationProperty("outputCacheSettings")>]
member this.OutputCacheSettings : System.Web.Configuration.OutputCacheSettingsSection
Public ReadOnly Property OutputCacheSettings As OutputCacheSettingsSection

プロパティ値

OutputCacheSettingsSection

OutputCacheSettingsSection オブジェクト。

属性

次のコード例は、既存の Web アプリケーションの OutputCacheSettingsSection 構成ファイルからオブジェクトを取得する方法を示しています。


// Get the .<outputCacheSettings> section
OutputCacheSettingsSection outputCacheSettings=
    cachingSectionGroup.OutputCacheSettings;

// Display the number of existing 
// profiles.
int profilesCount = 
    outputCacheSettings.OutputCacheProfiles.Count;
msg = String.Format(
"Number of profiles: {0}\n",
profilesCount.ToString());

Console.Write(msg);
' Get the .<outputCacheSettings> section
Dim outputCacheSettings _
As OutputCacheSettingsSection = _
cachingSectionGroup.OutputCacheSettings

' Display the number of existing 
' profiles.
Dim profilesCount As Integer = _
outputCacheSettings.OutputCacheProfiles.Count
msg = String.Format( _
"Number of profiles: {0}" + _
ControlChars.Lf, profilesCount.ToString())

Console.Write(msg)

注釈

OutputCacheSettingsSection オブジェクトは構成ファイルの outputCacheSettings セクションを参照します。

出力キャッシュ設定では、ディスク ベースの永続出力キャッシュを有効または無効にし、キャッシュするデータを保持する場所を定義し、アプリケーションごとのキャッシュの最大サイズを指定します。

ASP.NET では、ディレクティブの属性を使用し、プログラムでクラスのプロパティとメソッドを使用して、ページ応答の@ OutputCache複数のバージョンをHttpCachePolicy宣言によってキャッシュできます。

種類を使用して OutputCacheSettingsSection アプリケーションを構成することで、同じ結果を OutputCacheProfile 得ることができます。

適用対象

こちらもご覧ください