OutputCacheProfile.VaryByParam プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
VaryByParam プロパティを取得または設定します。
public:
property System::String ^ VaryByParam { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("varyByParam")]
public string VaryByParam { get; set; }
[<System.Configuration.ConfigurationProperty("varyByParam")>]
member this.VaryByParam : string with get, set
Public Property VaryByParam As String
プロパティ値
- 属性
例
次のコード例は、 VaryByParam プロパティの使用方法を示しています。
// Get the current VaryByParam.
String varyByParamValue =
outputCacheProfile.VaryByParam;
// Set the VaryByParam.
outputCacheProfile.VaryByParam =
string.Empty;
' Get the current VaryByParam property.
Dim varyByParamValue As String = _
outputCacheProfile.VaryByParam
' Set the VaryByParam property.
outputCacheProfile.VaryByParam = _
String.Empty
注釈
VaryByParamは、キャッシュされた出力を変更するために使用される、セミコロンで区切られたパラメーターのセットです。 これにより、GET クエリ文字列またはフォーム POST パラメーターによってキャッシュされた出力を変更できます。 たとえば、クエリ文字列またはフォーム POST パラメーターと共にユーザー コントロール名を指定することで、ユーザー コントロールの出力をキャッシュに変更できます。 詳細については、「 複数バージョンのユーザー コントロール出力のキャッシュ」を参照してください。
VaryByParam設定は、プロファイルを使用して、ページのプロファイルまたは@ OutputCache ディレクティブで定義する必要があります。
Note
OutputCacheProfile.VaryByParam設定は、VaryByParam の属性で使用される設定と同じです。 "*" の値を設定してすべてのパラメーターで変更することはお勧めしません。 キャッシュ オーバーフローや Web サーバーに対するサービス拒否攻撃が発生する可能性があります。