OutputCacheSection.OmitVaryStar Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta un valore che indica se l'intestazione vary è attivata.
public:
property bool OmitVaryStar { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("omitVaryStar", DefaultValue=false)]
public bool OmitVaryStar { get; set; }
[<System.Configuration.ConfigurationProperty("omitVaryStar", DefaultValue=false)>]
member this.OmitVaryStar : bool with get, set
Public Property OmitVaryStar As Boolean
Valore della proprietà
true se l'intestazione vary è attivata. In caso contrario, false. Il valore predefinito è false.
- Attributi
Esempio
Nell'esempio di codice riportato di seguito viene illustrato come utilizzare la proprietà OmitVaryStar.
// Get the current OmitVaryStar.
Boolean omitVaryStar =
outputCacheSection.OmitVaryStar;
// Set the OmitVaryStar.
outputCacheSection.OmitVaryStar = false;
' Get the current OmitVaryStar.
Dim omitVaryStar As [Boolean] = _
outputCacheSection.OmitVaryStar
' Set the OmitVaryStar.
outputCacheSection.OmitVaryStar = False
Commenti
L'intestazione vary indica i campi di intestazione della richiesta usati dal server per determinare quali risposte memorizzate nella cache vengono inviate in risposta a una richiesta client. Il valore predefinito per la OmitVaryStar proprietà è false. Per impostazione predefinita, ASP.NET invia l'intestazione vary in tutte le richieste, nonché in tutte le POST stringhe di query GET-request.
OmitVaryStar Se è true, ASP.NET omette l'intestazione quando restituisce la vary risposta per le pagine memorizzate nella cache, se la GET richiesta a una risposta viene memorizzata nella cache senza proprietà e la POST richiesta a una risposta viene memorizzata nella cache senza VaryByParamVaryByCustom proprietà e nessuna VaryByCustom proprietà.