OutputCacheProfile.VaryByParam プロパティ

定義

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 値。

属性

次のコード例は、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 ディレクティブで定義する必要があります。

注意

設定はOutputCacheProfile.VaryByParam@ OutputCacheVaryByParam 属性で使用される設定と同じです。 "*" の値を設定してすべてのパラメーターで変更することはお勧めしません。 これにより、Web サーバーに対するキャッシュ オーバーフローまたはサービス拒否攻撃が発生する可能性があります。

適用対象

こちらもご覧ください