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


OutputCacheSection.SendCacheControlHeader Свойство

Определение

Возвращает или задает значение, указывающее, отправляется ли cache-control:private заголовок модулем выходного кэша по умолчанию.

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

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

true Значение , если отправка заголовка cache-control:private включена; в противном случае false. Значение по умолчанию — true.

Атрибуты

Примеры

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


// Get the current SendCacheControlHeader.
Boolean sendCacheControlHeaderValue = 
    outputCacheSection.SendCacheControlHeader;

// Set the SendCacheControlHeader.
outputCacheSection.SendCacheControlHeader = false;
' Get the current SendCacheControlHeader.
  Dim sendCacheControlHeaderValue As [Boolean] = _
  outputCacheSection.SendCacheControlHeader

' Set the SendCacheControlHeader.
outputCacheSection.SendCacheControlHeader = False

Комментарии

Применяется SendCacheControlHeader к содержимому без кэширования выходных данных. Если задано значение false, cache-control:private заголовок по умолчанию не отправляется.

Замечание

Этот параметр позволяет кэшировать содержимое на клиенте по умолчанию.

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

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