PartialCachingAttribute.VaryByCustom Özellik

Tanım

Çıkış önbelleğinin kullanıcı denetimini değiştirmek için kullanacağı özel dizelerin listesini alır.

public:
 property System::String ^ VaryByCustom { System::String ^ get(); };
public:
 property System::String ^ VaryByCustom { System::String ^ get(); void set(System::String ^ value); };
public string VaryByCustom { get; }
public string VaryByCustom { get; set; }
member this.VaryByCustom : string
member this.VaryByCustom : string with get, set
Public ReadOnly Property VaryByCustom As String
Public Property VaryByCustom As String

Özellik Değeri

Özel dizelerin listesi.

Örnekler

Aşağıdaki kod örneği, oluşturucunun PartialCachingAttribute(Int32, String, String, String) bir kullanıcı denetimine nasıl uygulanabileceğini gösterir. Örnekte oluşturucu, kullanıcı denetiminin önbelleğe alınabileceğini belirtmek ve önbellek girişinin tarayıcı türüne ve ana sürüm numarasına bağımlı olduğunu belirtmek için kullanılır.

// Set the PartialCachingAttribute.Duration property to
// 20 seconds and the PartialCachingAttribute.VaryByCustom
// property to browser.
[PartialCaching(20, null, null, "browser")]
public partial class ctlSelect : UserControl
' Set the PartialCachingAttribute.Duration property to
' 20 seconds and the PartialCachingAttribute.VaryByCustom
' property to browser.
<PartialCaching(20, Nothing, Nothing, "browser")> _
Public Class ctlSelect
    Inherits UserControl

Açıklamalar

Bu özellik için "tarayıcı" belirtirseniz, kullanıcı denetimi tarayıcı türüne ve ana sürüm numarasına göre değişir. Bu özelliği, çıktı önbelleğinin kullanıcı denetimi yanıtını değiştirebileceği değerleri genişletmek için de kullanabilirsiniz.

Şunlara uygulanır