OutputCacheProfile.VaryByCustom プロパティ

定義

VaryByCustom プロパティを取得または設定します。

public:
 property System::String ^ VaryByCustom { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("varyByCustom")]
public string VaryByCustom { get; set; }
[<System.Configuration.ConfigurationProperty("varyByCustom")>]
member this.VaryByCustom : string with get, set
Public Property VaryByCustom As String

プロパティ値

VaryByCustom の値です。

属性

次のコード例は、 VaryByCustom プロパティの使用方法を示しています。


// Get the current VaryByCustom.
String varyByCustomValue = 
    outputCacheProfile.VaryByCustom;

// Set the VaryByCustom.
outputCacheProfile.VaryByCustom = 
    string.Empty;
  ' Get the current VaryByCustom.
  Dim varyByCustomValue As String = _
  outputCacheProfile.VaryByCustom

  ' Set the VaryByCustom property.
  outputCacheProfile.VaryByCustom = _
  String.Empty

注釈

VaryByCustomには、カスタム出力キャッシュの要件を表す任意のテキストを指定できます。 カスタム文字列を入力する場合は、アプリケーションの Global.asax ファイルの GetVaryByCustomString メソッドをオーバーライドする必要があります。

VaryByCustom設定は、@ OutputCache ディレクティブのVaryByCustom属性で使用される設定と同じです。

適用対象

こちらもご覧ください