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 è abilitata.
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 è abilitata; in caso contrario, false. Il valore predefinito è false.
- Attributi
Esempio
Nell'esempio di codice seguente viene illustrato come utilizzare la OmitVaryStar proprietà .
// 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 richiesta utilizzati 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 POST richieste, nonché in tutte le stringhe di query GET-request.
OmitVaryStar Se è true, ASP.NET omette l'intestazione vary quando restituisce la risposta per le pagine memorizzate nella cache, purché la GET richiesta a una risposta venga memorizzata nella cache senza VaryByCustom proprietà e la POST richiesta a una risposta venga memorizzata nella cache senza VaryByParam proprietà e nessuna VaryByCustom proprietà.