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


OutputCacheSection.EnableOutputCache Свойство

Определение

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

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

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

Значение в противном случае . Значение по умолчанию — true.

Атрибуты

Примеры

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


// Get the current EnabledOutputCache.
Boolean enabledOutputCache = 
    outputCacheSection.EnableOutputCache;

// Set the EnabledOutputCache.
outputCacheSection.EnableOutputCache = false;
' Get the current EnabledOutputCache.
  Dim enabledOutputCache As [Boolean] = _
  outputCacheSection.EnableOutputCache

' Set the EnabledOutputCache.
outputCacheSection.EnableOutputCache = False

Комментарии

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

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

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