Поделиться через


OutputCacheSection.EnableFragmentCache Свойство

Определение

Возвращает или задает значение, указывающее, включен ли кэш фрагментов.

public:
 property bool EnableFragmentCache { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enableFragmentCache", DefaultValue=true)]
public bool EnableFragmentCache { get; set; }
[<System.Configuration.ConfigurationProperty("enableFragmentCache", DefaultValue=true)>]
member this.EnableFragmentCache : bool with get, set
Public Property EnableFragmentCache As Boolean

Значение свойства

true Значение , если кэш фрагментов включен; falseв противном случае . Значение по умолчанию — true.

Атрибуты

Примеры

В следующем примере кода показано, как использовать EnableFragmentCache свойство.


// Get the current EnabledFragmentCache.
Boolean enabledFragmentCache =
    outputCacheSection.EnableFragmentCache;

// Set the EnabledFragmentCache.
outputCacheSection.EnableFragmentCache = false;
' Get the current EnabledFragmentCache.
  Dim enabledFragmentCache As [Boolean] = _
  outputCacheSection.EnableFragmentCache

' Set the EnabledFragmentCache.
outputCacheSection.EnableFragmentCache = False

Комментарии

EnableFragmentCache Если для свойства задано falseзначение, выходные данные пользовательского элемента управления кэшируются независимо от директивы @OutputCache или используемого профиля кэширования. Дополнительные сведения см. в разделах OutputCacheSettingsSection и OutputCacheProfile.

Применяется к

См. также раздел